Sleep deprivation is a common brainwashing technique. Then there are the random rewards (a smile or cute gurgle here and there).
You should be bonded and "addicted" to the baby by now
Contracts are performance based as of 2007. This means that a) the lowest bidder doesn't always win, and b) there no more incentive for contractors to "fill seats" by hiring more people than they need. (Although to be fair, in many cases the government dictated the number of "required" hires under the old system).
But here's why they use contractors: Aside from doctors and pilots, officers do not generally do "work." They're managers. People with college degrees don't usually go enlisted, therefore they end up as managers whether they like it or not, and even if they went enlisted, there is no such job (MOS/AFSC/NEC) as "programmer" for any branch of the military, that I'm aware of.
But for the sake of argument, if there were such a job, enlisted personnel need only pass the ASVAB and then their training, and it's in the instructor's best interest to make sure they pass the training. Passing such a course would mean taking multiple choice tests that you'd have to be not merely incompetent, but truly stupid to fail. In other words, you're not going to weed out incompetence in military training.
Essentially, the *only* option right now is outsourcing. That could change in the future, but currently the government is not in the business of developing products, including software.
All of that said, there are incompetent programmers in just about every organization I've ever seen or been a part of. Now I wouldn't call myself a *great* programmer. I make less than ideal design choices all the time, sometimes even *bad* ones, and I always look at my old code and wonder what the @#$% I was thinking. Even so, I understand the relevant concepts, I learn from my mistakes, and I get the job done. I regularly encounter people who can't even do that. I could only speculate as to the reasons they're not fired, but regardless, they're out there.
Your code should be more efficient!