Using too much detergent and/or fabric softener in water not hot enough to totally dissolve them can cause those substances to cake up on internal washer parts. These deposits can smell and may need to be physically removed from affected parts but you can try doing several *very* hot washes using bleach and leaving the lid open between washes to allow any residual moisture, which may cause mold and mildew, to evaporate.