Because it stinks? Pretty simple, really
I don't think it's that simple. Stinky things are everywhere and we don't stigmatize them the same way. Car Exhaust, Sauerkraut, Roadkill, Hot Tar, Chlorine, etc etc. Some farts are stinkier than others, but even the worst ones are tolerable. I grew up near a dairy farm! That smelled five times worse than the worst fart, but we tolerated it.
There is a social attitude about bodily processes where we blame people for doing them, even though everybody does them daily. Things like teasing a coworker for taking a particularly stinky shit, or having garlic on their breath, or when a woman has cramps. With farts people get blamed for the sound even before the smell follows. On the flip side, we celebrate those actions in private. Sneaking off to let off that fart you've been holding in feels awesome, the louder the better!
The behavior around farts has a weird double standard to it, and that reeks of
Social Control instead of common sense. Like expensive clothes, using ten-dollar words when a one-dollar word is sufficient, or having an art collection. These are used as symbols of class to create social hierarchies. If you don't learn to hide your farts, you are sorting yourself into the common classes! The trade off for living in the superior class is not being free to fart. The whole thing is crazy.