Why don't Buddists eat onions or garlic?
Not sure about Buddhists, but Jains don't eat onions and potatoes because they grow undergound. Retrieving them requires the entire plant to be uprooted, as opposed to fruits and veggies growing above ground which can be plucked off. They respect plant life and would rather not have it die, hence they don't eat produce which grows underground. Another reason is the microscopic life which relies on these underground veggies for sustenance, and they want to do their best to avoid harming life of any kind.
From Religion and Vegetarianism A Buddhist Perspective on Vegetarianism by Lin Ching Shywan The Surangama Sutra says: "All living creatures seek the 'three kinds of wisdom,' and should refrain from eating the 'five pungent.' These five pungent foods create lust when eaten cooked, and rage when eaten raw." It goes on to say that "Even if someone can recite twelve sutras from memory, the gods of the ten heavens will all disdain him if he eats pungent foods in this world, because of his strong odor and uncleanliness, and will give distance themselves far from him." This means that pungent foods arouse lust, and give one an explosive temper and one's body a bad odor. These foods are unclean, and if a person's body and mind are not clean, how can he succeed at purifying himself through Buddhism?
Those vegetables are called five pungent root, the ones that contains a lot of dailysulfide which causes garlic like odor. They believed that the smell of these vegetables will cause distraction to others for ascetic training. Moreover, only taking in clean foods are believed to can create clean major functional organs. Often times before entering the Buddhist temple, you will see the sign that say people whoever took meat, alcohol and five pungent roots are not worthy to enter the training grounds.
Also like the Indian Jain religion, they feel they can cause ignorance and aggregation, certain food aid, some calm, others nuture and then there are those that poison the chi or spirit...