The ancient sages probably had lots of time to observe Nature. They agreed that there were some qualities of Nature — such as hot/cold, dry/moist, static/mobile, rough/smooth, dense/subtle — that were useful to describe what they observed. These same qualities were found in the body and mind, and in diseases.
They found that qualities in Nature increased similar qualities in the body: For instance, a naturally “warm” person, on a hot summer day, having a curry lunch, would break out in sweat. And if repeated daily, that person might then break out in rashes or other inflammation. Then someone would need to prescribe “cooling” food and herbs, and the rashes would clear.
Thus, the use of OPPOSITE qualities became the basic principle of therapy, or maintaining balance of health.
Later, a theory of five elements evolved — ether (empty space), air, fire, water and earth. This was a convenient way of grouping qualities, so you could say something or someone was “airy” in nature rather than saying they expressed mobile, cold and light qualities.