Prestige, deterrence and great big toys for great big boys
In reference to the Trident post below, it strikes me that much of the debate as to the validity of the nuclear deterrence is a re-hash of old arguments over old technology. The battleship, first properly evidence by the Dreadnought class was debated in very similar terms. Possession of a battleship fleet was what marked out the major powers, the Empires, from the also-rans. The were massive, expensive, technologically cutting-edge and, in a sense beautiful.
Yet they were ultimately never very good at what they were principally designed to be for. The only time in naval history that battleships confronted each other in a fleet action, the battle of Jutland, the results were deeply unsatisfying. The advent of the submarine and the aircraft carrier were to render the battleship effectively obsolete, although the USS Missouri was still in service in the first Gulf war.
They were ultimately a defensive weapon, a reaction to the possession of similar ships by rival powers. Their utility in time of war was strictly limited, see the demise of HMS Repulse, and their political importance always outweighed their military effectiveness. And the public loved them. "We want eight and we won't wait" was the demand of the press in the great naval scare of 1910. I'm not sure we're so enthusiastic about the modern day equivalent.