Govt funds the risky research, and then hands the baton to competitive industry, which is good at 'finding markets', making it a product, and optimizing costs.
Eg, google, amazon, etc, would not exist without the govt early (and continuing) funding of the tech their business is based on.
What is then supposed to happen is that profits are taxed sufficiently, feeding back in to the system, but that part appears to have broken down lately.