According to the Ganesha Purana, a ferocious demon named Analasura (whose name translates to "fire demon") terrorized the heavens by emitting blinding heat and fire from his eyes, destroying everything in his path. When the devas sought refuge with Lord Ganesha, Ganesha fought the demon and swallowed him whole to protect the universe. However, consuming the fiery demon caused severe burning and agony inside Ganesha's stomach. The devas tried cooling him with the moon, lotus flowers, and cold water, but nothing provided relief. Finally, a group of sages offered him 21 shoots of fresh, Durva grass. Upon consuming the grass, the intense heat immediately subsided. Pleased, Lord Ganesha declared that offering 21 Durva blades with devotion would grant his highest blessings.
After that the fire became cooler and honoured by the loads of durva grass, the supreme Self became satisfied. Realizing this they all worshipped Gajanana and Gajanana himself rejoiced because of the many loads of durva grass.
19-22. To the gods and sages he said, “Whether it be great or small, without blades of durva grass, devotion and worship performed for me is useless. Nobody will obtain the results of worship without blades of durva grass. Therefore, whether it be one piece or twenty-one, durva grass devoutly offered at dawn by my devotees will produce a great result. But that will not be brought about by one hundred sacrifices, gifts, masses of performances of sacred vows, fierce austerities and restraints undertaken over myriads of lives. It is gained because of durva grass, gods and sages.”
—Ganesha puran, chapter 65