To understand why the Ultra secret had to be kept secret, one has to look at the encryption technology that was in use during the post war period, and in many cases is still in use today. Although we may consider the German Enigma machines just technology from the second world war, most people never imagined that that technology continued to be in use for much Government and military message traffic.
As evidence I cite the British Typex machines which were in use to the mid 1950's. The American KL-7 which was in use by NATO until 1983, the Russian Fialka which was kept secret until 2005, and the Swiss NEMA which was declassified in 1992. All these machines use rotor wheel technology just as the Enigma did. The methods of attacking the different varieties of Enigma performed at Bletchley Park would still have value in leveraging other forms of rotor machines in use.
Quite clearly, if Britain and their Allies were using similar encryption systems that they knew could be vulnerable they would not want others to acquire that technology. If, during the Cold War, the eastern block was using similar technology it was in GCHQ's interest that they did not develop a need to develop new encryption technology. If other states were purchasing and using Swiss machines, no one would want that equipment to fall out of favour for some other method that was more resistant to the forms of attack developed as part of the Ultra Secret.
The secret was kept well because many understood why it had to remain a secret. As the rumours started to leak out in various books and publications, the details became more and more explicit. Some critical details, however, remained secret and it was enough to protect secret of the vulnerabilities of rotor based mechanisms for now. Eventually when so much time had passed it was believed that everything could be spoken about, as there was nothing left to hide. One publication* is believed to have lifted that last veil from which cascaded the obsolescence of rotor based machines in the 1980s. Much to the chagrin of GCHQ and NSA the genie was out of the bottle.
That is why the machines had to be destroyed and the Ultra Secret kept#.
Epilogue
This issue is still extant today. One only has to consider the latest news regarding the CIA and Cryto AG. Their machines are all rotor based also. I think the media fails to understand the nature of the compromise of the Hagelin based machines. That weakness is Tunny and it is not in the machines but in the method of attack. But perhaps I digress...
* The Hut Six Story by Gordon Welchman in 1982, which caused him to lose his security clearance and his job. He never really understood why, because those on the inside of the security system couldn't tell him. They will never confirm or deny.
#My opinion, based on long years of cordial conversations with my good friend the late Dr. Hale (late of Hut 6) and others.