Vamana taught King Mahabali that arrogance and pride should be abandoned if any advancement in life is to be made,
and that wealth should never be taken for granted since it can so easily be taken away.
When i asked an indian guy for ganesha beeing vishnu's son,
he became nervously asking me:
WHO told you?
In the meantime Lord Shiva returned happy after a glorious victory won for the Gods,
only to be stopped at the entrance by this little boy - Ganesha, who he did not even recognize!
Ganesha, acting on his mother\'s orders verbatim, did not allow Shiva to enter the house.
He was, after all, only following Parvathi\'s instructions and due to the circumstances under which he was created,
he had no idea who Lord Shiva was.
Lord Shiva (not unknown for his wild, raging temper) was enraged beyond control and in a fit of rage slashed the little boy\'s head.
In the meantime Parvathi emerged from her bath and was aghast at the scene.
She was very, very angry at her lordship for what had happened and explained to him the truth.
Lord Shiva was very repentant and wanting to make it up to Parvathi,
decided to put life back into Ganesha by putting the head of the first sleeping living creature he or his soldiers came across
and that which was sleeping with its head to the north.
He sent his soldiers to go in search of such a creature. The first one which the soldiers came across was an elephant.
So Lord Shiva re-created his son with the head of the elephant. Hence the elephant head of Lord Ganesha.
Om namo bhagavate parvathidevaya.
sources: vt.edu, common