Right, but I'd argue that doing that is also something that could be construed as harassing your coworkers. Perhaps not in the common usage sense, but certainly in the "spitting on someone is assault and grabbing a coworkers ass is sexual harassment" sense.
I wouldn't consider letting out a fart anymore inappropriate than excusing oneself to go to the bathroom, but doing either in a way that you know will disrupt and cause coworkers discomfort is inappropriate and harassing, not because of the act itself, but because of how you handle it.