I think the fact that a job wouldn't be done in a free market system is not a justification for saying that they don't contribute on net. The free market doesn't lend itself to funding a lot of work that is still worth doing - basic research being an obvious example.
I'm not sure that's the case, since I'm not sure if government-funded research was more of an effect or a cause of the decline of privately-funded research.
I can think of quite a few technologies that are the unforeseen side-effect of some government funded research, and would have probably never occurred otherwise. For example MRI, the Web, and the Internet. I would imagine quite a bit of research on green technologies and so on have also mostly been government funded until recently.
Companies mostly fund research that brings immediate results. Sure, some (like IBM) may be looking further down the line, and some probably just subsidise some research as PR. But areas where there is no clear advantage and in addition carry a large risk, are mostly shunned by corporations.
Really, though, it's hard to find credible reasons why companies would fund fundamental (say) physics research, isn't it? The benefits of such research are often felt decades down the line.
Companies and individuals have certainly funded activities with decades-later payoffs before. If it's not currently done as much, it may be partly because the decades-hence future is more uncertain than it used to be, for both technological and legislative reasons. Again, I don't see an empirically obvious answer.
However, I think there might be a naming problem, here. If it seems likely to have practical applications at some point, it's not "fundamental" or "pure" research anymore. Companies doing research into quantum computers or molecular assembly are certainly doing so because they expect to make a profit on it eventually, but the very fact that they have this expectation means that it's disqualified from fundamental research. I still think that there are examples of companies funding general research on the assumption that something will come of it, but it's hard to disentangle the effects of government. The most prominent example, Bell Labs, was run by a government-supported monopoly, for example.