Sherr88 is right !
Front loading washing machines hold water. I would also leave the door open or ajar. Before that, take an old towel and wipe under and between the rubber front lining. There is always water standing in there. And on a regular basis, like once a month, run a wash cycle with hot bleach water. You may be able to control the musty smell that way.