It was observed that Lord Shiva did not have anything to left to eat. This was attributed to the fact that nobody could help to satisfy his hunger. As a result, Anusuya served the elephant head lord with a sweet. When he partakes the same, Ganpati Bappa left out a big burp. This was seen that he was full, yet it is important to note that it took Lord Shiva 21 burps while Ganesha took one.
Goddess Parvati became curious and wanted to know more about the same and when she learnt it was a Modak, she gave a request that others can also offer him Modak and the legend was carried forward by generations. Even today, the same is considered as a great prasad for the Lord.