Frequently ..and in our case, almost universally, it took public money to develop all advanced technology. While the market can surely drive some things, you will never have things like re-refined oil without government being the first to put its foot forward.
How would we have gotten to the moon by market forces? How about the massive spin off technologies that came out of it? About the only thing that was of benefit when the funding stopped was that all the NASA grade solderers got jobs at places like Philco and improved the quality of workmanship.