Abstaining one from eating onion and garlic by devotees has always been a topic of debate. Every vegetable has an effect on our body and accordingly our body reacts to it you can see its reflection in ones nature and style of living.
It is believed that before one prays to god we should not only bathe externally but we should be clean internally too, onion and garlic emit repugnant smell after one eats them from the body, which is unacceptable .Secondly these vegetables are libido enhancers in other words possess stimulating qualities that attracts person building an aggressive nature known as ‘tamsik guna’ in mythological world which hinder one to indulge towards spirituality. Thirdly these vegetables are considered that they were not gifted us by lord but they were born from a sin committed by a Brahman family.
In olden eras Brahmans possessed the power to bring the dead alive. Once a Brahman performed yajna and sacrificed a cow. To which he would give its life back through his magic chants, but while he was busy in his yajna one of the members hid some piece of the cow to test his powers. When the Brahman brought the cow back to life he saw some of the belly part missing; on meditating he figured out the reason behind it. The family member realised his mistake and threw the piece far away in the fields to avoid punishment. That enchanted living piece of the cow transformed into edible items; thus the bones changed into garlic and the meat part into onion. Henceforth these vegetables are not considered as vegetarian by all Vaishnava and Brahmin devotees.