The answer to why your dehumidifier smells bad is that it likely has mold or mildew buildup inside. This is a common issue with dehumidifiers that can cause a musty, unpleasant odor. The mold and mildew can grow on the coils, water collection tank, or other internal components when the dehumidifier isn't properly cleaned and maintained.
To fix the odor, you'll need to thoroughly clean the dehumidifier, including the water tank, coils, and any other areas where moisture can collect. You can use a mild bleach solution or a specialized dehumidifier cleaner to disinfect and remove the mold and mildew. Be sure to clean the unit according to the manufacturer's instructions. If the odor persists or you're unable to fully clean the unit, it's best to call in a professional HVAC technician to inspect and service the dehumidifier.