The story
Lobhasura is said to have been born of Kubera, the god of wealth, in a moment of greed. Taught by Shukracharya, he worshipped Shiva with the five-syllable mantra and won the boon of being without fear. Then he conquered the three worlds and, never satisfied, wanted still more, until he demanded even Kailash.
The gods prayed to Ganesha, who came as Gajanana. He sent Shiva as his messenger to warn the demon, and Shukracharya too told his pupil that he could not win against this god. Lobhasura gave up his conquests and surrendered at the feet of Gajanana, who forgave him.
Meaning
Greed is the desire that grows the more it is fed. Gajanana, with the head of the elephant, the largest and most contented of animals, overcomes it with wisdom and enough.
The story also teaches that even wealth that comes from the gods, as Kubera does, can give birth to greed unless it is held with a generous heart.
Among the eight incarnations
The Mudgala Purana, a scripture of the Ganapatya tradition, tells of eight incarnations of Ganesha, each come to overcome a demon who is the very form of a fault of the mind. In most of the stories the demon is not killed but surrenders and is forgiven, because a fault is overcome by understanding rather than by force. Devotees read the eight together as a path of inner purification. Gajanana is the fourth of them.
