...in late stage development which is MUCH less risky. Super risky early stage tech development mostly happens in the public sector at taxpayer expense through government agencies like DARPA.
A lot of things are easier when it happens with other people's money. A lot of those projects didn't necessarily have the expectation to make/turn a profit.
DARPA's budget is about $3B this year alone. You can thank Uncle Sam for autonomous vehicles, Siri and the Internet, to pick just three.
So if investing taxes in people isn't "free market capitalism" then neither is the tech industry.