This part is taken from Various Stories & Tales in “Spiritual Stories” as Told by Ramana Maharshi
While Bhagavan was perusing the monthly journal Grihalakshmi he began to laugh and handed the journal to Suri Nagamma as she was leaving the hall, saying, “The greatness of garlic is described in it. Please read it.” The article contained recipes for making chutneys and pickles and in conclusion it stated that there is nothing equal to it in its greatness and its benefit to the body. When Suri Nagamma returned to the hall in the afternoon, Sri Bhagavan inquired if she had read the article and said, “People say it is very good for health. Really it is so. It cures rheumatism and gives strength to the body. For children it acts like amrit (nectar). Garlic is also known as amrit.”
A devotee asked how it got that name. Sri Bhagavan replied, “There is a curious story about it,” and began telling the following story.
As is well known, when gods (devas) and demons (rakshasas) churned the ocean, amrit came out of it. When the rakshasas were running away with the vessel containing amrit, the devas appealed to Vishnu. Vishnu came on to the scene in the shape of Mohini (enchantress), and offered to resolve their quarrel by serving amrit to them all. They agreed. While serving it to the gods first, it appeared that there might not be enough to go round for the demons. One of the latter got into the line of the gods, unobserved by Mohini, and was swallowing the amrit, when the Sun and Moon noticed it and gave her the hint. She threw the ladle, with which the amrit was being served, at the demon in such a way as to cut off his head. The ladle became the Chakra (an invincible lethal weapon of Vishnu) and cut off his head. But as the amrit had already gone down his throat, the head became a graha (planet) and has since been taking vengeance on the Sun and Moon at the time of an eclipse. That is the story. Now, when the head of the demon was severed, the trunk fell down, and in the process, a few drops of amrit fell on the ground. It is said that those drops became the garlic plant. That is why it is said that garlic has some of the properties of amrit. It is very good for the body. But since it also has the touch of the demon, it has tamasic qualities too, which when eaten affect the mind. Hence, it is forbidden for sadhakas.