"The bill indicates that Accumulo may violate OMB Circular A-130, a government policy that bars agencies from building software if it’s less expensive to use commercial software that’s already available. And according to one congressional staffer who worked on the bill, this is indeed the case. He asked that his name not be used in this story, as he’s not authorized to speak with the press." http://www.wired.com/wiredenterprise/2012/07/nsa-accumulo-go...
I don't see where the big deal is. MS is an American company that employs a lot of people. That money will come back to the government in taxes and spending someday.
So I don't think the prices these companies are asking from governments is in any way related to development time of the software, or even with maintenance time. I think it's mostly based on how much the government is willing to pay.
And I disagree with your last remark, too. By that logic the government can just spend it on anything and as much as they want. They need to be efficient with the money, to be able to make or sustain multiple projects at once. Otherwise they'll have to raise taxes, fire people from other programs, or they wouldn't start new needed projects.
Small companies founded+run by agile hackers struggle to navigate their way to contracts under those circumstances. Or at least that's what I've seen from reading about efforts to encourage it in the UK.