Siva returned from his hunting trip while Parvati was still in her bath and wanted to enter his home. Ganesha, under strict orders from his mother, refused to let Siva in.
``This is my own house,'' shouted Siva angrily.
Siva was dressed in a beaten hide and covered with ashes. Ganesha spoke to him as to a beggar, telling him to go away.
``Half the world is mine,'' shouted Siva, ``although to you I look like a half-naked man.''
``Then,'' said Ganesha with equanimity, ``go roam about your half of the world. I am Siva's son and I guard my mother's home.''
``I know my own sons,'' Siva raged, ``and you are not one of them.'' So saying, Siva cut off Ganesha's head.
Hearing the commotion, Parvati came running out. Seeing her son headless, she berated Siva, first for leaving her, second for not knowing his own son, third for their poverty and so on. Siva could bear it no longer. He saw an elephant walking by and taking its head, placed it on Ganesha's shoulders and brought him back to life.
That is why Ganesha has an elephant head.