I have a whirlpool front loader. I was having the same issue and running a cycle of bleach water thru it seemed to help. You also have to clean the
door gasket with bleach/water as water get's trapped in the gasket and will mold if not cleaned out regularly. Your clothes and towels will start to smell like mold if you let it go too long. There is a lot of info online about it.
Another thing to check, is the screen just ahead of the pump. (Under the washer behind the front lower panel). Its interesting the manual doesn't say anything about this screen. I took mine apart and there was all kinds of gunk in it that didn't smell too good! I think on the newer models they have a little trap
door in front to get to this screen easier. Since all my kids are gone, we don't seem to have this problem as often!
One more thing if you want to research it. Some of the liquid "He" soaps are made with animal fat which allows mold/bacteria to grow faster. We switched to the powder "He"
soap (no animal fat) and this has helped tremendously. No more moldy smell.