As if harassed by an enemy in the form of lusty desires, Lord Shiva followed the path of Lord Vishnu, who acts very wonderfully and who had taken the form of Mohini. Just as a maddened bull elephant follows a female elephant who is able to conceive pregnancy, Lord Shiva followed the beautiful woman and discharged semen, wheresoever on the surface of the globe fell the semen of the great personality of Lord Shiva, mines of gold and silver later appeared. Srila Visvanatha Cakravarti Thakura comments that those who seek gold and silver can worship Lord Shiva for material opulences. Lord Shiva lives under a bael tree and does not even construct a house in which to dwell, but although he is apparently poverty-stricken, his devotees are sometimes opulently endowed with large quantities of silver and gold.
Source: A.C. Bhaktivedanta Swami Prabhupada (2014 edition), “Srimad Bhagavatam”, Eighth Canto, Chapter 12 – Text 31, 32 & 33