That already happens. Such projects include the Internet, microprocessors, airplanes, voice recognition, robots, lasers, satellite view, highways, engines, the assembly line method of production, and many, many more. Except of course it's not projects I approve, it's projects the government approves.
The question is not whether the government should be funding things -- that's already the case.
The question is how much control should investors have over their investments. And in the case of our high tech economy, taxpayers are the biggest investors.
Could a government insist that, if they did fund a next-generation sports car (humvee, armored vehicle, sedan, motorcycle, bicycle) that the schematics and designs of that car be released in a libre fashion? Using libre formats?
Granted, this is not true in all cases, there are exceptions, and so on, but the logic of it makes sense to me.
Vaccines.
Most people don't spend a lot of time thinking about how they don't have polio.
Not having polio benefits you even if you don't think about it. Your being vaccinated against it benefits me even if neither of us think about it.
I'd argue not having polio is "ultimately beneficial to a person" regardless of their beliefs about value.
"Government funds" come out of people's paychecks. What you're asking for is that everyone be forced to contribute to projects that you approve of, regardless of whether those people value those projects or not. I can't see a valid reason why someone that doesn't know about, need or want "free" software should be obligated to pay for it. What about their own needs, desires, goals and concerns? People need to be left free to keep the money they earn so that they can better their lives and pursue the things that matter to them.
I really like sports cars - I like them a lot. I think they're inspiring to look at, fun to drive, and I could make the argument that there are a lot of people, ranging from children to the elderly, that feel the same way about them. Each of us would love to own, maintain, collect, restore and design new sport cars. Generally speaking, love of these things is connected with all sorts of other interests, including science, math and engineering, art (sculpting, photography, etc.) Just like software, albeit to a lesser extent, sports cars have have some arguable "public benefit" (i.e., a concrete benefit for a finite, delimited subset of individuals in society).
Now imagine that we came up with some kind of government program would shower sports cars on anyone that applied for them. Why should my aunt - who barely drives - be forced to subsidize my sports car hobby, at the expense of her own desire to travel on a cruise ship to Alaska while she still can? (She is 79 years old.)
At this point, maybe you'd say, "Well, software benefits everyone far more than cars do. After all, even people that don't use computers at all benefit from the improved efficiency (lower prices, increased quality, etc.) that computers bring to our economy. So all we're doing here is recouping costs from free riders."
I don't have the space to do much more than to hint at the answer. This is by no means exhaustive, but one fundamental issue is this:
When you say, "benefit," what do you mean? In my view, a thing is not ultimately beneficial to a person unless they come to see for themselves how it is a benefit to their lives, via their own independent judgement. Sure, identifying what's good for other people is fine. But then insisting that they agree with you if and when they do not actually agree subverts their independent judgement, which is the very thing required to produce and select the things needed to improve their own lives. No one should be compelled to eat a meal that wipes out their olfactory bulb and tastebuds.