Response to your postscript: I know quite a few people who've worked for the NSA's mathematical research arms. They're not numpties. They're among the smartest people I've ever met (and I've been hanging around tier 1 research institutes, both public and private, my whole adult life).
Most math PhDs work in industry, not in academia or government. Industry pays the best of the 3 by far. But NSA has nonetheless attracted some very smart cookies. Personally, I sleep a bit better knowing that they're there.