The state secrets privilege was established in a US Supreme Court case from 1952. United States vs Reynolds. A B-29 crashed in Georgia. On board secret military tests were being conducted. The families of the victims wanted to view the accident report, but the government didn't want to release it. They argued that this would jeopardize national security. The government petitioned the court to dismiss the case without looking at the report. Just trust us. The court agreed. This decision has set the precedent for many subsequent court decisions, like the decision to deny detainees at Guantanamo a right to a day in court. Disclosure of evidence related to their detention puts US national security at risk supposedly.
The report related to the crash of the B-29 was finally released in 2000. Guess what? Nothing revealed in the report was in any way a threat to national security. The report did reveal negligence regarding the maintenance of the aircraft. That was about it.
So why did the government do this? The daughter of one of the men that died in the plane believes it was in fact to establish a precedent that allows the government to act with impunity. We can do whatever we want and never be subject to scrutiny.
Wikileaks and Guantanamo show that this is often the real purpose of secrecy today. Take a look at some of the Wikileaks revelations. The real enemy is not the terrorist abroad. It's the domestic population. Secrecy is intended to prevent Americans from knowing what the government and corporations are up to.