If you start early enough, many cats can be trained to at least tolerate baths. But you have to start while they can still be tricked into thinking this is normal behavior. Many wild cats enjoy swimming so it is behavior that can be learned without traumatizing the cat.
If you start as an adult... well, that's just not fair to the cat.
That said, we used to take our pet cat to a "critter cleaners" which gave the cat a thorough cleaning and grooming. He didn't seem to mind it too much but they were much more hands-on than simply throwing kitty into a washing machine like that. They'd calm him down, hold him firmly but gently, and use a low-pressure warm water hand-held shower extension. With two people doing the job, it's possible to clean a cat that way without suffering injuries.
He was a fairly mellow cat which helped, but more importantly from the time he was a kitten I had taught him that when a human held him down, it was time to chill out. Whenever we'd be playing and he got a little aggressive and bit or scratched me a little too hard, I'd subdue him and just hold him for a little while to show him I was the boss. Then I'd let him up, pet him a bit, and we'd continue playing no big deal. It got to the point where he'd act like a cat was supposed to, but if a person subdued him he'd squirm but never ever bite or scratch. He learned long ago from me that if he bit me I'd hold his mouth closed for a minute, and if he scratched too hard I'd hold his paws AND his mouth closed for a minute. We never had any problems even when he got older and needed to be fed pills routinely. We'd just kneel down, set him between our knees, hold his head and jaw with one hand, stick a finger between his molars to get him to open his mouth, and stuff the pill down past his tongue. Since he never fought back more than a little squirming, once we learned the technique it wasn't very traumatic and took only a few seconds.
That was the best cat I ever had... He lasted about 16 years before he fell asleep under the car one too many times.