The better question is, why is the government even financing software development.
It's a matter of securing the country's network infrastructure. Obviously the profit-driven commercial software houses are not up to the task, and the government thinks it needs to step in.
First, I want to say that I agree with you 100%. But, I can think of a situation where it makes sense...
The LAPACK/LINPACK project was started to reduce the cost of DOD/DOE govt contracts. The govt guys realized that there was a lot of duplication of effort by the various defense contractors on things like writing basic math subroutines. It was frustrating for them to pay 8 competing defense contractors for a project, and realize that each developed their own basic math subroutines on the govt nickel.
So they decided to set up a project to develop (and pay for) the subroutines once and make them then freely available to all players. This actually made a lot of sense, and saved the taxpayers money.