Much as I disagree with Daniel Dennett on most matters, I agree entirely with what he says in the following passage:
I deplore the narrow pragmatism that demands immediate social utility for any intellectual exercise. Theoretical physicists and cosmologists, for instance, may have more prestige than ontologists, but not because there is any more social utility in the satisfaction of their pure curiosity. Anyone who thinks it is ludicrous to pay someone good money to work out the ontology of dances (or numbers or opportunities) probably thinks the same thing about working out the identity of Homer or what happened in the first millionth of a second after the Big Bang. (Dennett and His Critics, ed. Dahlbom, Basil Blackwell 1993, p. 213. Emphasis in original.)
One of my favorite examples is complex numbers. A complex number involves a real factor and an imaginary factor i, where i= the square root of -1. Thus a complex number has the form, a + bi where a is the real part and bi is the imaginary part.
One can see why the term 'imaginary' is used. The number 1 has two square roots, 1 and -1 since if you square either you get 1. But what is the square root of -1? It can't be 1 and it can't be -1, since either squared gives a positive number. So the imaginary i is introduced as the square root of -1. Rather than say that negative numbers do not have square roots, mathematicians say that they have complex roots. Thus the square root of -9 = 3i.
Now to the practical sort of fellow who won't believe in anything that he can't hold in his hands and stick in his mouth, this all seems like idle speculation. He demands to know what good it is, what it can used for. Well, the surprising thing is is that the theory of complex numbers which originated in the work of such 16th century Italian mathematicians as Cardano (1501 - 1576) and Bombelli (1526-1572) turned out to find application to the physical world in electrical engineering. The electrical engineers use j instead of i because i is already in use for current.
Just one example of the application of complex numbers is in the concept of impedance. Impedance is a measure of opposition to a sinusoidal electric current. Impedance is a generalization of the concept of resistance which applies to direct current circuits. Consider a simple direct current circuit consisting of a battery, a light bulb, and a rheostat (variable resistor). Ohm's Law governs such circuits: I = E/R. If the voltage E ('E' for electromotive force) is constant, and the resistance R is increased, then the current I decreases causing the light to become dimmer. The resistance R is given as a real number. But the impedance of an alternating current circuit is given as a complex number.
Now what I find fascinating here is that the theory of complex numbers, which began life as something merely theoretical, turned out to have application to the physical world. One question in the philosophy of mathematics is: How is this possible? How is it possible that a discipline developed purely a priori can turn out to 'govern' nature? It is a classical Kantian question, but let's not pursue it.
My point is that the theory of complex numbers, which for a long time had no practical (e.g., engineering) use whatsoever, and was something of a mere mathematical curiosity, turned out to have such a use. Therefore, to demand that theoretical inquiry have immediate social utility is shortsighted and quite stupid. For such inquiry might turn how to be useful in the future.
But even if a branch of inquiry could not possibly have any application to the prediction and control of nature for human purposes, it would still have value as a form of the pursuit of truth. Truth is a value regardless of any use it may or may not have.
Social utility is a value. But truth is a value that trumps it. The pursuit of truth is an end in itself. Paradoxically, the pursuit of truth as an end in itself may be the best way to attain truth that is useful to us.