One day, the god Shiva and his consort Parvati got into an argument about the material world. Shiva said that everything materialistic was just an illusion, including the food that the humans ate. This infuriated Parvati, who governs materialistic aspects. To show Shiva and the world her importance, she disappeared, saying that she wanted to see how the world would survive without her.
With Parvati’s disappearance, the world was deprived of food, and there occurred a famine. Shiva’s followers begged him for food; even the Gods were forced to beg for food, but could not find any food. Finally, Shiva and his followers realised that there was only one kitchen on earth, in the city of Varanasi (Kashi), where food was still available.
Shiva went to Kashi to beg for food. To his surprise, the kitchen was owned by his wife Parvati, but in the form of Annapurna. She wore celestial purple and brown garments, which were lightly adorned with ornaments. She was seated on a throne, serving and distributed food to the starving gods and hungry inhabitants of the earth. Annapurna offered her food as alms to Shiva and made him realize that as Brahman, Shiva might have outgrown hunger; but his followers had not.
There is also another legend from the southern Indian states that the Shiva was cured of a curse of bharamahatidosha (for removing one of Lord Bhrama’s five heads) after getting food from the hands of Devis(Saraswati, Lakshmi, Parvathi). The skull of Bhrama deva stuck to the hands of lord Shiva, hence the name Kapalieshwara. It fell from his hands after he was offered food from Annapurani Devis’ hand. Hence all tri-devi goddesses are called Annapurani devis.