There are two legends behind the Annapurna Devi Mandir; according to one legend in the Hindu Mythology Lord Shiva said that all the things available on earth including food are an illusion for people. In anger and to prove the importance of food, Goddess Parvathi made all the foods on earth disappear. People started to suffer a lot due to lack of food including Lord Shiva. Lord Shiva then begged Goddess Parvathi to bring food back and Goddess Parvathi created a kitchen in Varanasi to provide food to Lord Shiva and the other people on the earth.
Another legend states that when Goddess Parvathi closed all three eyes of Lord Shiva, she lost her Gauri Form. In order to receive a Gauri form again, she was asked by Lord Shiva to donate Anna (food) to the commoners. Goddess Parvathi then took Annapurna Devi form to donate food to everyone in Varanasi. Therefore it is said that if you do Annadanam or donate food you will receive the blessings of both Lord Shiva and Goddess Parvathi.