It isn't hard to notice, for example, that in EU where gamedev companies often receive grants for various nebulous reasons tend to be companies that do not need the money in the first place (and yes, of course there are devs who received money that needed them, somehow people have to excuse the existence things they benefit from).
We manage to do this within other fields of endeavor, at least in the United States, by using an intermediary. Examples: National Science Foundation, Corporation for Public Broadcasting, National Endowment for the Arts.
Ultimately if people value things, they will buy them. Forcing people to pay for things they don’t want to buy simply because you think it would be good for them is a special kind of tyranny.
Wait until you learn where the rest of your tax dollars get spent.
Then all FOSS hackers will be like Khrushchev, wondering why Western industry always outproduced his own, even though the Soviets "where doing everything right".
There definitely is a reason, and it's the same reason this problem exists in the first place: it's hard to measure the value a library or tool generates, whether it's open source or not. How are you going to allocate this tax to projects at scale?
Companies already can barely solve this problem internally, and often fail completely at it. Just imagine how many times you read a comment on HN lamenting the lack of investment in IT infrastructure. The idea that you'll solve it at society scale as a government, for things much more nebulous than even IT infrastructure, is laughable.
But we've regulated the tragedy of the commons in all sorts of other instances. There's no reason, for example, that a small percentage of corporate income tax couldn't be allocated to a grant program for free and open source software projects.