Many people believe that Ganga married Shiva. Shiva married Parvati because she meditated him. He had a union with Mohini so as to ensure that Ayyappa is born. What is the story of why Shiva married Ganga?
According to the book Hindu Mythology, Vedic and Puranic, by W.J. Wilkins:
The Vaishnavas of Bengal have a popular legend that she was the wife of Vishnu, as were also Lakshmi and Gangā. The ladies disagreed [....] and Vishnu, finding that one wife was as much as even a god could manage, transferred Sarasvati to Brahmā and Gangā to Siva, and contented himself with Lakshmi alone.
The story actually comes from the Devi Puran Book 9 Chapter 6:
16-21. Nârâyana said :-- Hear, O Nârada! I will now describe that incident, the hearing of which removes all the sins. Laksmî, Sarasvatî and Gangâ, the three wives of Hari and all equally loved, remain always close to Hari. One day Gangâ cast side-long glances frequently towards Nârâyana and was eagerly looking at Him, with smile on Her lips. Seeing this, the Lord Nârâyana, startled and looked at Gangâ and smiled also. Laksmî saw that, but she did not take any offence. But Sarasvatî became very angry.
Lord Vishnu perhaps realizing that he should best remain out of a the argument left the place and then started the curses and counter curses. Saraswati tried to attack Ganga but Lakshmi intervened so she got cursed by the former to turn into a river. Seeing this Ganga gets angry and curses Saraswati:
39-44. Thus saying, Gangâ became ready to curse Sarasvatî and addressing Laksmî, said :-- “O Dear Padme! As that woman has cursed you to become a river, so I too curse her, that she, too, be turned into a river and she would go to the abode of men, the sinners, to the world and take their heaps of sins.”
Hearing this curse of Gangâ, Sarasvatî gave her curse, “You, too, will have to descend into the Bhurloka (the world) as a river, taking all the sins of the sinners.”
By the end of the argument the three goddesses have managed to get cursed by each other. When all the action is over Lord Vishnu returns and tells them that they would all have to be born as rivers on earth as a consequence of their curses:
O Bharatî! Let you go also and incarnate in part in Bhârata under the curse of Gangâ. O Good-natured One! Now go in full Amsas to Brahmâ and become His wife. Let Gangâ go also in Her fullness to S'iva. Let Padmâ remain with Me. Padmâ is of a peaceful nature, void of anger, devoted to Me and of a Sâttvika nature.
This is how Lord Shiva ends up marrying Ganga.