(Not saying this is true for all, some might just lie outright).
Newer washing machines rotate the drum slowly until the clothes separate, bringing the centre of mass closer to the axis of rotation, leading to much less vibration during the spin cycle. If the weight does not distribute after n cycles (e.g. if you put a single large and heavy duvet cover inside), some lower the spin RPM to a level that is deemed acceptable.
I've always assumed that they perform this measurement via the current curve of the motor during a rotation. Flattened curve -> distributed load, CG close to spin axis. Huge spike -> offset load, CG far away from spin axis -> bang bang bang walking washing machine.
There's some humor in the parallels with software development.
This can take hours, or even fail altogether and then you're left with sopping wet laundry.