All of the commentary, so far, has been, 'oh, isn't it shocking! The naughtiness of leaking goes right to the top!'
But this would be a good time to take a general look at this business of classified information.
The idea of secret intelligence, at the core, is a simple military paradigm.
Somewhere in the vast darkness of the Pacific, two fleets are maneuvering. Admiral Yamamoto wants to force the Americans to battle so he can finish off what's left of them. If he can do that, he believes, the Americans will accept a negotiated peace.
Admiral Nimitz has many places to defend. He needs to know where the Japanese will attack next and with how much force.
Now Nimitz can commit his fleet. When Yamamoto gets there the Americans are waiting in ambush for him.
The Battle of Midway is considered the decisive battle of the War in the Pacific. It is the end of the Japanese advance and the beginning of the American offensive.
Nimitz needed secret intelligence. He also needed it to be a secret that he had that secret intelligence.
Indeed, it had to be secret that he even had the capability of deciphering Japanese codes or else the Japanese would have changed their codes.
If the Japanese had even known how much money and manpower America was putting into cryptology, that might have alerted them, so that too had to be secret. Even knowledge of the entire intelligence budget might have been a clue, since by estimating how much went here and how much that must cost and so on, might lead them to guess that there was a certain amount left over and then they would meditate on where that might be going and one of their guesses would be into code work and they would have changed their codes in time to prevent Nimitz from learning Yamamoto's intentions.
Since the 2nd World War we have accumulated intelligence services, the amount of classified information has expanded voraciously and the culture of national security has grown like yeast.
It seems on the face of it, to be an irrefutable necessity.