Yes they have sulphur based compounds, hence why you cry when you cut them.
But how do they physically clear a room and a person of harmful bacteria and viruses?
Do they breathe, cycling the air of the room?
How do onions get to the billions of bacteria/viruses within a persons cells casing them to be sick?
If they are this powerful then surely a few cut onions placed around a house will render it bacteria free. Is the entire cleaning produce industry a scam?