It’s not the water heater’s fault. It’s science. Bacteria in the tank feast on the magnesium or aluminum in your anode rod. Their dinner party produces hydrogen sulfide gas. That’s the stink.
Think of it as microbial flatulence. Your water is just fine to drink, but your nose is screaming, “RUN!” The smell is harmless, but your dignity isn’t. No one wants guests thinking you’re brewing swamp juice.