I had the repair guy in to check on the smell from my new top loader washing machine. I replaced the old one because of it was smelling no matter what I did. I thought that being 15 years old, a seal had gone and oil was getting into the tub.
The repair guy asked what temp cycle we were using. I told him that I had always used warm/warm. Then my new house partner who had taken over most of the laundry duties coreccted me and said that she was using cold/cold because that's what the laundry detergent said was okay. He advised us to go back to at least warm/warm and see if the smell went away. It did.
Fast forward a few years. New house partner, new house, brand new front load washer and drier. After a few weeks of use, the towels started to stink. We had faithfully dried the washer after each use and left the door propped open. Then I remembered the previous washing machine problems. I checked and the default setting for the washer was cold/cold. I changed it to warm/warm and after a few cycles of using hot/hot, the smell went away. I've used it now for 3 years and no more smell problems.