A few of my school friends worked for GCHQ and I questioned their reasons for doing so around ten years or so ago (a lot has changed in the world since then, but a lot hasn't). Back then there were three reasons beyond 'I need an income':
1) terrorists - someone has got to stop them blowing up innocent babies and children
2) kiddie porn - someone has got to take the war on paedophiles seriously
3) organised crime - who knows? Selling arms to the terrorists? Laundering money. That's it. Laundering money and drugs. I remember now.
These 'reasons' can be trotted out like a mantra and working for them is a bit like being a soldier fighting a noble cause that everyone else has to respect.
As per other comment on 'The Cube', people at GCHQ are kept in little boxes and not made aware of what the big plan is. It is a system that works really well. So, even if someone's job has nothing to do with the war on kiddie porn, the war on drugs or The War Against Terror, they know that without their organisation's effort then we would be flooded with the evil stuff and democracy would be doomed.
The 'I cannot talk about my work' thing works really well. Although I am not convinced by it. I think that it is all too convenient to hide behind that rather than be honest about how dull/wrong a given job is.
I think you also place too much thought into the idea that NSA/GCHQ build these systems. Actually it is the guys at the contractors - Lockheed Martin - that build these things, the NSA/GCHQ guys are no more involved in things than the checkout staff at a supermarket are involved in all the evil things Walmart/Monsanto/whoever do. That is the saddest part of it. We uphold NSA/GCHQ to be omnipotent and omniscient, but they are not. The main contractor - Lockheed Martin - are upstream of what the NSA/GCHQ does and they are experts at getting government contracts. Since they can listen in to what all of the other contractors bid they can bid competitively if they really want the work. Since they also own most of the politicians and can promise so many jobs in so many states, they can own the entire government. NSA are not the enemy, Lockheed Martin and their rivals are. And, to answer your question, the dark side programmers work for them.