Don't most basic electric motors produce electricity if you passively spin the armature? Simples...
Yes, they can be made to, however washing machine motors are not basic.
They are not simple beasts which just sync up to the mains frequency.
They have several windings, and a tacho arrangement too.
They need to be driven by deep-magic controllers to regulate their speed.
They are capable of very high speeds if not regulated by the negative feedback system from the tacho to the controller.
This is how they can run tis way and that, at a wide range of speeds for washy washy and spinny spinny.
They are non-trivial things to spin up in a DIY bodge.
If you want to make an alternator, I'd choose a different donor part:-)
--
F