A substantial share of Indian vegetarian cooking excludes onion and garlic on principle, particularly in temple kitchens and certain communities. The interesting part is culinary: those cuisines had to solve the problems onion and garlic normally solve.

The exclusion follows a classification of foods

Classical Indian dietary thought sorts foods by their perceived effect on the mind, and onion and garlic fall into the category considered stimulating and agitating.

Cooking that aims at calmness therefore leaves them out, along with some other pungent ingredients, in favor of foods regarded as clarifying.

Jain dietary practice excludes them for a separate reason, since harvesting root vegetables destroys the plant and disturbs the soil organisms living around it.

Onion and garlic normally do three jobs

They contribute sweetness as their sugars caramelize, body as they break down into a gravy base, and a savory depth that reads as fullness.

Removing them leaves a gravy that is thin, sharp and one-dimensional unless each of those three jobs is assigned to something else.

This is why simply deleting them from a standard recipe rarely works, and why the cuisines that exclude them use different recipes rather than modified ones.

Asafoetida covers the savory gap

Asafoetida cooked briefly in hot fat produces a sulfurous, allium-like aroma that occupies roughly the position onion and garlic would have.

It is used in very small quantity and is added early, because its character changes completely between raw and cooked and it is unpleasant raw.

It does not replicate onion, and cooks in these traditions do not treat it as a replacement. It supplies the savory note while the sweetness and body are handled separately.

Body and sweetness come from elsewhere

Tomato, yogurt, coconut, nut pastes and soaked melon seeds supply thickness and richness, so the gravy has substance without an onion base underneath it.

Sweetness comes from tomato cooked down, from a little jaggery, or from vegetables such as pumpkin and gourd that sweeten as they cook.

Ginger and green chili carry the pungency, and because nothing masks them they are used with more precision than a recipe built on an onion base would require.

The result is a distinct cuisine, not a restricted one

Dishes built this way taste different rather than diminished: cleaner and more clearly spiced, with individual ingredients easier to identify on the palate.

Cooks who want to try the approach are better served by looking up recipes from these traditions directly than by adapting standard ones, since the substitutions have been worked out over a long time.

Temple kitchens are the clearest source, because they cook this way at scale every day and their dishes have been refined under the constraint rather than around it.