There are those who think Edward Snowden and Bradley Manning have betrayed trust, and there are those who think they exposed excessive and misguided government actions.
Although an organization depends on all involved following certain rules, what should an honorable person do when he or she feels that the organization is working against the public interest? Will reporting the problem up through the hierarchy eventually solve it? Or will somebody block it?
In more mundane terms, think of all the problems you have had with products and services. If you report them to the company or organization, do you really believe that you will find a champion who will right what you think is wrong? If you think that the reported wrong will be righted, take a peek at support boards of products. There are some problems that have been going on for years and haven't been fixed yet.
For a better look at this problem in far worse situations than inefficient software, see "The Banality of Systemic Evil", Peter Ludlow, New York Times, 2013-09-15.
A bureaucracy develops own set of rules to function "smoothly". Think of the bureaucracy of the Titanic. From the president of White Star Lines to Captain Edward Smith down to deck hands. Each person had a certain set of responsibilities, but almost none of them had all the information they really needed. Were they ready to listen to any warning advice? Was anybody willing to report upward anything that was amiss for a safe voyage?
Did anybody make a big fuss about forward observers not having adequate lights? Did anybody question the command "women and children only" in the partly full lifeboats? Did anyone question the locked doors trapping steerage passengers?
Patriotism is the ultimate "bureaucracy". Not enough of us question why we are using military force. It is considered unpatriotic to question the government in times of war. Amazingly, many "patriots" don't think the government can run a post office or devise regulations to protect the public. But few of them consider that "snafu" is a military term started by the troops. See "Military Slang", Wikipedia.
Some have said true patriots are those who resist supporting military action. I'll leave it to you to decide whether Snowden and Manning are patriots or scoundrels.