Einstein is a good example of theoretical work--didn't require much money. But the outcomes of that work, from nuclear weapons and power was funded by...the govt. No company could afford to do the research that was required without it.
The computer is another example. All of the early computers, ENIAC, EDVAC, MANIAC, etc were funded for weapons research. It was only after the basic working models were developed did private industry (Univac) start producing commercial machines.
DARPA also did the initial work in the switching protocols that underlie the internet. Mosaic, the first web browser was developed at CERN--before Netscape, or others came into the market.