I am not an expert on the history of the transistor, but I know enough for the purposes of this question (If anyone knows more, I would love to hear about).
The transistor (the piece of electronics found in effectively everything you use) came from an obscure branch of quantum mechanics which was called surface physics. The theoretical work began in the early 1900's during the beginning of quantum and had no immediate (or even foreseeable) application/use. By the late 1940's to early 1950's, the first prototypes of the transistor were developed (I believe the first was built at Bell Labs).
By the year 2006, the transistor alone would be responsible for over 30 trillion dollars (that is \$30,000,000,000,000 USD) in revenue (this comes from a 2007 MIT Masters thesis on a market evaluation of semiconductor technologies). A more recent report by McKinsey&Company found that search engines alone generate some $780 billion USD GDP annually across global markets. Thus, a seemingly intangible theory can result in very profitable applications.
There was a recent economic study [van Bochove, 2012] that showed the financial benefits of pure research. In that study, they state:
Directing basic research towards economic opportunities is detrimental to growth and may reduce the growth rate by as much as one half. The steady state is shown to be globally stable; in the steady state, the growth rate is independent of the research intensity, but the level of income depends on it. Given current OECD levels of R&D spending and saving, a one dollar increase of applied R&D spending will increase national income with 6-25 dollars and one dollar extra basic research by 20-100 dollars. These rates of return are ten and thirty times higher, respectively, than those on physical capital investment.
References
van Bochove, C.A. "Basic Research and Prosperity: Sampling and Selection of Technological Possibilities and of Scientific Hypotheses as an Alternative Engine of Endogenous Growth," CWTS Working Paper Series, Leiden University, 2012.