One day Parvati did not wish to be disturbed while bathing, least of all by Shiva who was in the habit of doing so, much to her annoyance. So she made the statue of a child from the paste she bathed with to guard her. But first she breathed life into him. She called the child Ganesha and asked him to guard the home while she bathed. When Shiva showed up yet again, he was stopped from entering by a determined Ganesha. Shiva had no idea who this child was so he asked his forces to destroy him. But Ganesha had powers bestowed on him by Parvati and defeated Shiva’s army. Shiva, known for his temper, lost control and chopped off Ganesha’s head.
Parvati was furious when she saw what had happened to her beloved child, moreso at her husband’s hands. She threatened to destroy the entire universe as a consequence. Now, the universe was the responsibility of Bramha, Vishnu, and Shiva. Alarmed, Brahma apologised to Parvati on behalf of Shiva and advised her not to destroy the universe. Parvati relented on the conditions that Ganesha be brought back to life and be worshipped as the primary God. Shiva, too, was contrite and apologized to Parvati.
He advised his troops to go into the forest and get the head of the first animal they sighted. They came across an elephant before any other and brought back his head. This was then placed over Ganesha’s body by Brahma. Shiva brought Ganesha to life thereafter and accepted him as his own son. This is how Ganesha was born and worshipped as the God of Gods.