A smelly bathtub drain is almost always decomposing organic material -- hair, soap scum, and body oils -- coating the inside of the drain pipe and P-trap. The biofilm feeds bacteria that produce hydrogen sulfide (rotten egg smell) and other odor compounds. The fix is mechanical: remove the buildup. Chemical drain cleaners mask the smell temporarily but do not remove the biofilm. A physical cleaning of the stopper, crossbar, and trap eliminates the odor at its source.