Why does my front loading clothes washer stink?
As one of the comments already mentioned, a common problem with front loaders is mold in the gaskets. The easiest way to avoid this is to leave the washing machine open after you're done using it.

There are special cleaning detergents you can use to help get rid of the smell and mold (they are basically bleach in puck form).  One product I have used with good results is Affresh (I have no affiliation with this product or company).

Some front loaders have a special cycle to run with these.  Check your owners manual for any specific cleaning instructions or cleaning product recommendations.