I don't think necessity is the mother of invention. Invention, in my opinion, arises directly from idleness, possibly also from laziness - to save oneself trouble.
It is characteristic of fundamental discoveries, of great achievements of the intellect, that they retain an undiminished power upon the imagination of the thinker. The memorable experiment of Faraday with a disc rotating between two poles of a magnet, which has borne such magnificent fruit, has long passed into every-day experience; yet there are certain features about this embryo of the present dynamos and motors which even today appear to us striking, and are worthy of the most careful study.
The scientific theorist is not to be envied. For Nature, or more precisely experiment, is an exorable and not very friendly judge of his work. It never says "yes" to a theory. In the most favorable cases it says "Maybe," and in the great majority of cases simply "No." If an experiment agrees with a theory it means for the latter "Maybe," and if it does not agree it means "No." Probably every theory will some day experience its "No" - most theories, soon after conception.
It is true that the grasping of truth is not possible without empirical basis. However, the deeper we penetrate and the more extensive and embracing our theories become the less empirical knowledge is needed to determine those theories.