In a Thursday blog post, Stanford legal scholar Jennifer Granick describes a July 30 dinner with National Security Agency director Keith Alexander. She describes how Alexander explained to her, with a tone of slight exasperation, that the NSA's domestic surveillance programs operate within the law and under the strict supervision of the courts.

Over the next three weeks the public would learn otherwise. An internal audit would show rampant privacy violations at the agency, while a FISA court opinion found that the NSA had broken the law and repeatedly misled the court.

"How does a good man sit across from you at the dinner table and assure you the government is properly constrained," Granick wonders, "when in reality it lies and disregards even the most anemic purported safeguards?"

Granick thinks Alexander was sincere. And I believe her. Alexander is hardly the only leader of a powerful institution who is unduly optimistic about the benevolence and effectiveness of the organization he leads. Think, for example, of George W. Bush with his "Mission Accomplished" sign. Or a 2012 interview I did with Paul Michel, who had recently retired as the nation's top patent judge and was oblivious to the growing patent litigation problem. Spending time at the apex of a powerful institution almost inevitably gives people a skewed understanding of the world.

There are several reasons for that. In the first place, people tend to seek employment with institutions they admire. An ardent civil libertarian is unlikely to pursue a career in the intelligence community; few patent skeptics pursue careers in patent law. And this pro-institution bias is reinforced at each level of the career ladder. Thomas Drake was once a senior executive at the National Security Agency. But concerns about the NSA's policy compelled him to speak out. As a result, he now works at an Apple store. Many of his former peers who didn't object to the NSA's misconduct continue to have positions of influence within the intelligence community.

Alexander himself illustrates the pattern. He attended West Point and worked his way up through the ranks of the military, holding a variety of intelligence posts. If he'd harbored doubts about the appropriateness of mass surveillance, he likely would have steered his career in another direction decades ago.

The tendency to promote team players and marginalize dissenters creates a danger of groupthink at the highest levels of the organization. The problem is exacerbated by people's reluctance to tell their bosses bad news. Each level of the bureaucracy gives its bosses a sugar-coated version of the information it receives from subordinates. By the time information reaches the top, it can be dramatically skewed.

This filtering process distorts the information powerful organizations receive from the outside, too. Powerful people are more likely to attend parties and give speeches with friendly audiences than hostile ones. An organization's press office will naturally give preferential access to reporters who write positive stories about them. As a result, a man in Alexander's position may rarely encounter well-informed critics who feel free to give him candid feedback on his performance.

The problem is greatly magnified by the NSA's secrecy. Ordinarily, people are motivated to report bad news to their superiors because they assume the boss eventually find out about it from other channels. But when everything an organization does is secret, sweeping bad news under the rug becomes extremely tempting.

Hence, it's not surprising that Alexander believes his agency's domestic surveillance programs are both carefully constrained by law and essential for national security. For eight years, he has been surrounded by people who are highly motivated to tell him that, and to downplay contrary evidence.