This is commonly due to a faulty catalytic converter. This is the component responsible for converting the smelly hydrogen sulfide into harmless and non-smelly sulfur dioxide. When this fails to happen because of a malfunction, the cabin is likely to smell when AC is switched on. Other reasons behind this can be the accumulation of bacteria, fungi, or other micro-organisms on the AC vents. When they decompose after a prolonged period, they are likely to produce a smell similar to rotten eggs.