Similarly, why hasn't anyone built a bigger tank than the Maus? Was there something about the ideologies in these Axis countries that made them want to build the biggest and baddest weapons, even if it wasn't very efficient?
The short and rather glib answer is that it's because no one builds battleships anymore. They aren't useful.
The last one launched was HMS Vanguard, commissioned in 1946 and already a white elephant at the time -- it was scrapped in 1960 -- but its size didn't approach the Yamato class. The four Iowa-class battleships of the US navy were kept in service after the war in various capacities -- all four served in Korea, but only USS New Jersey served in Vietnam. While they were recommissioned in the 1980s as part of Reagan's naval buildup and two saw service in the 1991 Gulf war, they were decommissioned in the 1990s and are currently preserved as museum ships. They could in theory be reactivated, but realistically manning requirements make that a dead end.
The US Navy had planned a class of battleships, the Montana class, with four turrets and 12 16"/50 caliber guns that would have been within striking distance of the Yamatos in size -- 70,900 long tons full load, where the Yamatos were 72,000 -- but they were never built.
If you're curious about capital ships in general, not just battleships, there are several capital ships that outpace the Yamato class in size (depending on how you "size" a ship -- displacement is one measure). The Iowas were longer than the Yamatos, though the Yamato class was larger overall. The Yamato class had the largest guns fitted on a battleship (though the British had monitors with 18" guns). The Midway class of carriers were longer than the Yamatos, and the Kitty Hawk and all subsequent classes (Enterprise, Nimitz, Ford) of US carriers were/are longer, wider, and displaced more tonnage. In the British navy, HMS Queen Elizabeth and her sister ship Prince of Wales are both larger than the Yamatos.
In terms of why did the Japanese build such large ships: It had to do with their naval doctrine, which they adopted knowing they could never outbuild the USN. Partially adapted from an earlier answer:
Japan was quite aware that a long war against the U.S. was not winnable. Their war aims were to secure the resources of Southeast Asia (in particular oil, but also rubber and other industrial supplies). They couldn't do that with a U.S. presence in the Philippines. So their overall war plan, which saw successive revisions throughout the decades before 1941, was to quickly defeat colonial powers in Southeast Asia, and to build a defensive perimeter that the U.S. fleet would be attrited by before a final annihilating battle, after which the U.S. would sue for peace. The idea was that the American fleet, steaming west, would have to face Japanese air power and submarine attacks before making it to the vicinity of the Philippines or the home islands, where it would be decisively beaten.
To that end, the Japanese fleet's composition emphasized quality over quantity; they trained very elite naval aviators, for example, but very few of them. They also emphasized night fighting, the use of torpedoes, and an offensive spirit that was reckless and dashing, all to overcome numerical weakness that was inevitable given the two countries' industrial bases. At the start of the war, the Japanese arguably had the finest air fleet in the world, absolutely had the largest battleships, and had unparalleled torpedo technology.
The Yamato class battleships (of which only two were completed, and the third was turned into a carrier) were built in secret and in contravention of international naval treaties. The goal of building them was to have a ship that could take on US ships from outside their range, and ideally stand off and destroy them from afar. There have been approximately eleventy billion "who would win" threads on Internet message boards regarding the Yamatos versus the Iowas or other battleships, but the bottom line is that the Japanese regarded having super battleships that were each the equals to two or three American battleships as the only likely way to force the Americans to the negotiating table.