Lord Brahma created the
universe and during the process two demons,Madhu and Kaitak were also
created.The demons were blessed by Brahma that no one will know the secret
of their death till they themselves disclose it.
The demons were out of control because of
this blessing and started torturing the Gods.Shaken by this lord
Vishnu attacked them but failed to kill the demons.
He soon ran to lord Shiva for his help.Shiva
advised him to pray Ganesha,being the ultimate power.On request from Lord
Vishnu Ganesha appeared for help.
The demons started trembling on seeing the
powerful look of Shree Ganesha and disclosed their secret.Lord Vishnu soon
attacked the demons and killed them.
On returning back lord Vishnu,to his
surprise,found a self created Ganesha idol(Swayamboo)with trunk turned on
right side.
Since Lord Brahma received the power(Siddhi)
of killing the demons from Ganesha,he established a Ganesha idol by
naming him as SiddhiVinayak.