I read where (D) president Johnson gave away that secret plane; he let it be known we had it.
Kind of hard to keep the secret of the SR-71 a secret when it is a big plane, takes an hour or so to prepare it for flight on the flight line. Some one is going to see it, and the enemy is going to be able to figure out what it is and by how fast it goes on their radar, etc.
The enemy has spies outside of all most or all of every US military base it pretty hard for something like them to not notice, and report information back to their country.