The gas that gets pumped into your house has no smell. This means the first sign you get that you're inhaling gas is a lack of oxygen to the brain. To correct that problem, companies use a chemical characteristic of badly made wine.
Natural gas can be dangerous. Good thing it smells bad, right? Wrong. Natural gas is odorless, and, throughout history, this has caused problems. By the time that people realize they are in trouble, they have too little oxygen in their brains to be able to cope with it. Companies have dealt with the problem by infusing gas with a fun little chemical called mercaptan.
Mercaptan, otherwise known as methanethiol, has a chemical formula of CH3SH. Methane enthusiasts will recognize this as the formula for methane (CH4) with an added sulfur atom. So mercaptan gives us the down home smell of fart with just a touch of sulfurous rotten egg. The combination gets people's attention right away, which is great for natural gas companies that don't want their product murdering people.
It's not so good for wine makers. The fermentation process of wine necessarily ends with a lot of dead yeast. Residual yeasts in wine, called lees, settle to the bottom of barrels or bottles. Over time, they make mercaptans - variations on the basic CH3SH structure of mercaptan. Some of these variations have a simple extra carbon and hydrogen attached. Others have longer strings of atoms. The point is, they all have the methane and sulfur that human noses pick up so easily. Just a tiny hint of mercaptan gives wine an onion or sulfur smell. (Wine with mercaptans may also smell like urine. Mercaptans are what certain people pee out when they eat asparagus.) Careful filtering gets the yeasts away from the wine and prevents mercaptans from forming. Wine that smells rubbery or oniony won't kill you, since mercaptans are completely harmless, but it will let you know that its makers were slapdash.
So mercaptan smells bad, but provides a valuable service - it will save your life and save your palate.
Top Image: Multimotyl