Answer: The Gemara (Shabbos 138a) teaches that there are certain acts that are prohibited miderabanan on Shabbos because they are uvdin dechol, mundane, weekday activities. Included in this would be a vigorous massage (Rashi, Shabbos 147a) or weightlifting (Rashi, Beitza 29b).
R’ Mordechai Yaakov Breisch (Chelkas Yaakov OC 107) writes that one mustn’t place dirty clothes in a washing machine on Shabbos as it is considered uvdin dechol. Additionally, as one would normally fill the wash after Shabbos, putting clothes in on Shabbos is considered hachana, preparing for after Shabbos. We are also concerned that the clothes will get wet in the machine, which will aid the cleaning.
R’ Yisroel Dovid Harfenes (Nishmas Shabbos 4:367), however, disagrees. While emptying a basket into the washing machine would be hachana, if one would put such clothes straight into the machine during the week even long before they put the wash on, then doing so now is not considered hachana. As washing machines are typically dry when open, we don’t need to be concerned that the clothes will become wet.
R’ Menashe Klein (Mishne Halachos 4:44) adds that providing that one would do so during the week, one doesn’t need to be concerned that others will suspect them of washing their clothes on Shabbos. Nor would the washing machine be muktze if one would normally put soiled laundry into the machine hours before washing them.
In conclusion, one may place dirty clothes straight into the washing machine on Shabbos if they would normally do so during the week even before putting the wash on. One may not, however, sort clothes or empty the washing basket into it.