In Hinduism, all the food items have been categorised into three parts which are Rajasic, Tamasic and Sattvik bhojan. It is believed that Sattvik food items are the ones that provide spiritual advancement.
All vegetarian food items, with few as exceptions, are Saatvik in nature.
Sattvic diet gives importance to seasonal foods, fruits, dairy products, nuts, seeds, oils, ripe vegetables, legumes, whole grains, and non-meat based proteins.
Rajasic food items, on the other hand, have a stimulating effect on body and mind. It has neither positive or negative impact on the body.
Food that harms the mind or body is considered to Tamasic in nature. It is believed to cause mental dullness. Since onion and garlic are classified as Tamasic in nature, they are prohibited during the nine-day-long holy festival.
This makes onion and garlic an untouchable item during the festivity.