Why did they keep building battleships? well they kind of didnt. Many were lost in WW1, others were scuttled, and some were remodeled. Few new battleships were actualy constructed. There were multiple treaties to limit navies especially battleship numbers, weapon caliber, and tonnage. Some tried to skirt this by making things like "pocket battleships" (really just battlecruisers) using more efficient methods to have smaller, faster, and still with armor and weapons. Eventually the treaties became null and void as eventually nations just ignored it. the last battleship was made in 1944 and its mission was shore bombardment.
WW2 battleship effectiveness was abysmal. High value targets that could be taken down by any ship or plane carrying torpedoes or bombs (and many were).
In game terms it would be like every single hit has a chance to instantly destroy you by getting into some weak point triggering an ammunition explosion, a reactor core overload, or engine failure.
The WOB Jihad had great usage of Nuclear weapons. When relatively common Aerospace Fighters are carrying tactical nukes at something around 1/1000th of the cost of a warship. After it most fleets had been devastated and the need to rebuild infrastructure was far more important that making more warships to fight non-existent battles against other crippled nations.
Battleships were built in fairly large numbers between the wars - it wasn't a pre-WW1 naval race, but they added up fairly quickly, especially given the naval arms limitation treaties. The Brits built Hood, Nelson, and Rodney before the treaties and four KGVs afterwards. The Americans built three Colorados, two North Carolinas, four South Dakotas, and four Iowas. The Germans built two Scharnhorsts and two Bismarcks, the Japanese two Nagatos and two Yamatos, the Italians three Littorios, and the French two Dunkerques and two Richelieus. That's 35 battleships between the major powers, and in terms of combined performance they could probably have beaten all pre-WW1 capital ships combined. (To be fair, some of those were laid down in WW1, and the Hood was nominally a battlecruiser. But they were all finished post-war, and Hood was a battleship in all but name.)
And while battleships weren't the primary striking arm in WW2, they did a lot of effective combat - gun duels were fairly common in the Mediterranean and more than a few happened in the Pacific, and the major air victories over them(most notably Taranto, Pearl Harbor, and Force Z) were all considered huge tactical victories because the ships were real, important military targets. They didn't clash gun-to-gun as often as people might have expected them to, but they provided local surface dominance that was extremely important to a wide range of roles, from convoying to bombardment to carrier protection. If I was a fleet planner in 1930, even knowing what I know now about how WW2 would be fought in broad strokes, I'd want to have at least a handful of battleships in my fleet(maybe one for every two carriers?).
Also, in Battletech terms, every shot
does have a chance to trigger an ammo explosion or an engine failure. TACs exist, and we still use mechs. (Nukes, admittedly, are a bigger problem - I don't think they're really compatible with the setting BT wants to be, so they get ignored as often as we can)