The idea that garlic and onions shouldn't be used together in cooking is primarily based on traditional Ayurvedic and certain cultural beliefs rather than scientific evidence. Ayurveda is an ancient system of medicine and traditional healing that originated in India, and it classifies foods based on their taste (rasa), energy (virya), and post-digestive effect (vipaka). According to Ayurveda, garlic is considered heating (ushna virya) and has a pungent taste (katu rasa), while onions are also considered heating (ushna virya) but have a sweet taste (madhura rasa). The combination of two heating foods is believed to cause an imbalance in the body.
However, it's essential to recognize that these beliefs are not universally accepted, and there is no concrete scientific evidence supporting the notion that combining garlic and onions is harmful to health or causes any imbalances.
In culinary practices worldwide, garlic and onions are frequently used together to enhance flavor and aroma in various dishes. They both belong to the Allium family and have similar pungent and aromatic properties, which complement each other well in many cuisines.
Unless you have specific dietary restrictions or follow Ayurvedic principles strictly, there is no reason to avoid using garlic and onions together in your cooking. They can add depth and deliciousness to your meals and are commonly used in combination in countless savory dishes around the world. As with any dietary choices, moderation and a balanced diet are key to promoting overall health and well-being.