Is it true that JFK was not informed about the existence of U.S. nuclear missiles in Turkey? And that he only learned about this from his generals when the Cuban missile crisis unfolded? Someone once told me that this became known through the Kennedy Tapes.
I am curious whether there were any situations in the past where the military or secret services withheld information from the POTUS.
The argument that Kennedy didn't know comes from a single recorded exchange on October 16, when JFK and his advisers were contemplating Khrushchev's motivations:
"Why does he put these in there, though? ... It's just as if we suddenly began to put a major number of MRBMs in Turkey. Now that’d be goddamned dangerous, I would think."
To which McGeorge Bundy, his national security adviser, replied: "Well, we did it, Mr. President."
So does that mean Kennedy was unaware? No.
The Jupiter arrangement had been worked out in 1959, before the Kennedy administration took office. The actual deployments didn't start until 1961. Within seven weeks of the inauguration, though, both Kennedy and McNamara were trying to back out of the deal. The missiles were extremely problematic from a lot of standpoints (aside from being so close to the borders, they were also incredibly vulnerable — they were fragile enough that they would not survive any kind of even conventional retaliatory attack, so they could only be used in a first-strike situation — and unreliable). They faced resistance both from Strategic Air Command, and also from the "host states" for the Jupiters (Turkey and Italy).
Kennedy himself suggested they get rid of the missiles in Turkey at a National Security Council meeting in early 1961. It didn’t happen (the Berlin Crisis happened instead, and derailed things). In the summer of 1962, months before the Cuban Crisis, Kennedy told Under Secretary of State George Ball to have the missiles removed despite any potential “political cost” to the United States. Ball talked to the Turkish ambassador, who rejected the idea, and nothing happened until after the Crisis.
So it seems pretty clear to me that Kennedy’s quote here was meant to be sarcastic — an epic burn directed at the military. He personally had been involved, for over a year, but most recently several months, before the Cuban Missile Crisis, trying to get rid of them. Why? Because, as Bundy recalled, “He always preferred the system which could survive an attack against the system which might provoke one.” So you can see why he was not especially averse to horse-trading them out in the end, even if he worked to keep that "trade" secret. JFK got rid of missiles he didn't want anyway, in exchange for the resolution of the Cuban Crisis.
As an aside, this is a great example of the need for contextualization of historical evidence. A single snippet, like the Kennedy quote, is easy to misinterpret if you don't look at all of the other evidence that surrounds and gives it more meaning.
Source on the Kennedy stuff: Larry Loeb, “Jupiter Missiles in Europe: A Measure of Presidential Power,” World Affairs 139, no. 1 (Summer 1976), 27-39.
As for your second question, are there instances where the president has been “out of the loop”? Definitely. At some level, it must be the case — the president, even one who is not essentially unable to focus for more than 15 minutes, cannot see or know everything that the US government or military is doing. This is especially the case in periods where communication was slower, and typically the military does not consult the president on every little decision it makes. (It is not clear, for example, whether anyone in the Executive Branch was asked about the firebombing of Tokyo before it occurred. The Secretary of War, Henry Stimson, learned about it from the newspapers.)
There are a few instances where there were very conspicuous cases of uninformed presidents. One of the most famous is the case of the Venona project. This involved decrypting World War II-era Soviet communications during the early Cold War, and using it to catch spies who had been active in the earlier period (Klaus Fuchs, the Rosenbergs, etc.). All evidence suggests that neither Truman nor Eisenhower were informed of this project or its implications, in perhaps an undue exercise of caution about a very sensitive source. (On this, see Daniel Moynihan, Secrecy: The American Experience, 1998.)