I believe in and practice a good deal of "alternative" medicine, but the "onion sucks diseases out of the air" theory is a myth left over from the Middle Ages when people didn't understand disease and though that many illnesses were caused by poisonous vapors. They would see that a cut onion sitting on a table would turn colors, and somehow began associating that with it sucking up sicknesses. It doesn't. Studies have been done on it. However, onion and its relatives have many medicinal benefits if taken internally.
An onion left in a warm, humid incubator for 3 weeks...sounds like a good way to grow mold and other nasties.