Hmmm. A more interesting question is "why should the public pay someone to develop a software tool that they then charge us again to use?"
In most of my contractual dealings with the federal government, the government has non-exclusive rights in data in perpetuity. In other words, they can use the tool forever without paying any more for it (support is a separate consideration). The developer may however also retain rights to the code, and sell/lease/license it commercially as they wish.
A similarly interesting, follow-on question is "To what extent, if at all, should the rights of the government flow through to the citizen taxpayers it (the government) purports to represent and serve?"