content: Like the source of what seems to be damn near every single problem in the world - cognitive dissonance. For what it's worth it's not actually terribly complex. Writing low security software or software that 'seems' secure, but isn't, is infinitely easier than writing genuinely secure software or developing genuinely secure algorithms. However, alot of what organizations like the NSA/GCHQ do is complex and writing and developing complex systems is going to be highly intrinsically rewarding for a skilled individual. One of the things Snowden has stated is that the NSA (and presumably other security agencies worldwide) would regularly distribute internal propaganda to try to keep morale up, and prevent Snowdens. For somebody who wants to believe they're doing the right thing, all they need to do is stop listening to that voice in the back of their head and read that propaganda and soak it all in as fact. Pair that with a rewarding job and it's easy to see how good people end up doing bad things for a living. This also isn't even touching on another problem of our economic system. In the US very few companies actively seek out math majors except for a very small number of absolutely tedious positions like actuarial analysis. The NSA is actually largest employer of math majors in the entire country. In our increasingly poor job market I imagine plenty of these people feel bound to the organizations just because it's steady employment with room for advancement.