Detecting a smell involves a chemical reaction between a gas you breath into your nose and the smell sensors in your nose. As is normal in chemistry, reactions occur faster at higher temperatures than at lower ones. Farting in the bath expels the gas through hot water, instead of into the normal cool air. The gas warms up. so when you breath some in, it reacts faster and you notice it quickly, But also more of the gas will react with more sensors, so the experience is, shall we say, more intense ;)
Finally, you are normally smelling nice pleasant perfumes present in the bath soap, and suddenly you smell something different. So you exagerate the difference and it seems worse to you. So it could be mainly psychological.
Did you know that H2S, which causes the rotten egg smell, is more poisonous that hydrogen cyanide? Isn't it lucky there is very very little of it present farts!