I've heard two speculations:
1) Onions & garlic are used to flavor meat, so they are guilty by association. I've heard the Jains have a similar prohibition for this reason.
2) Onions & garlic incite the "passions"-- in other words, its a Indian herbal viagra.
Does anyone know the real motivation for prohibiting onions and garlic? Is the real motivation lost to the mist of time?
This is the 4th minor Precept in the Brahma Net Sutra.