Why do some homes avoid onion and garlic?
they are traditionally seen as rājasic or tāmasic — stimulating rather than calming — so many devotional homes leave them out, especially in food for God.
The Manusmṛti lists garlic, onion, leeks and mushrooms among foods that the twice-born should not eat, and later devotional traditions continued this. The reasoning given is that they excite the senses and heat the body, making the mind restless and less suited to meditation.
So Vaiṣṇava homes, many Brahmin and Jain households (Jains for their own reasons of non-harm to root plants), temple kitchens and people keeping vratas avoid them. Food offered as naivedya in most temples is cooked without them. Asafoetida (hīṅg) and ginger are used to give flavour instead.
At the same time, millions of devout Hindu families cook with onion and garlic every day, and regional cuisines across India depend on them. It is a matter of family and sampradāya practice, not a universal rule. Many families simply avoid them on vrata days, during Navarātri or Śrāvaṇa, and in food offered to God.
Source: Manusmṛti 5.5 · Hīṅg and ginger used instead
Dharma Q&A — worship at home · Ask a Jyotishi your own question