The Legend of Ganga
The legend of Gangas descent from the heavens into the earth has been narrated in the Hindu mythological epic of Ramayana. The legend explains the popular custom of giving bath to Shiv Linga on Shivaratri festival.
Once King Sagar - the ruler of Ayodhya and an ancestor of Lord Rama successfully performed the Ashwamedha Yagya for 99 times. Each time, he sent the horse around the earth it returned to the kingdom unchallenged. However, Indra - the King of Gods became jealous of King Sagars success. So when King Sagar performed the sacrifice of the 100th time, Indra kidnapped and hid the Yagya horse in the hermitage of Kapila Muni
In search of the horse, sixty thousand princes from Ayodhya reached Kapil Munis hermitage. They mistook the sage to be the abductor and attacked him. An enraged Kapila Muni burnt the 60,000 princes to ashes. On hearing about the plight of his father and uncles, King Bhagiratha - one of the grandchildren of King Sagar requested Kapila Muni to grant a solution to the problem. Kapila Muni advised that the waters of the river Ganga would miraculously bring back the dead princes to life.
King Bhagirath left his kingdom and began to mediate for the salvation of the souls of his ancestors. It is said that Bhagirath observed a penance to Brahma for a thousand years, requesting Ganga to come down to earth from heaven and wash over his ancestor?s ashes to release them from a curse and allow them to go to heaven. Pleased with the devotion, Brahma granted Bhagiraths wish but told him to pray to Lord Shiva, as he alone could sustain the weight of her descent.Accordingly, Lord Shiva held out his thick matted hair to catch the river as she descended. The meandering through Shivas lock softened Gangas journey to the earth and the holy waters of river Ganga thus washed away the ashes of Bhagiraths ancestors. A modified version of the legend says, what reached the earth were just sprinkles from Lord Shivas hair. The Ganga, thus, became an attribute of Shiva. This manifestation of Shiva is known as Gangadhara.
The legend is re-enacted by devotees of Lord Shiva as they give a bath to the linga during worship. And for this reason, many devotees prefer to take a dip in the holy water of river Ganga on a Shivaratri day.