Swaying is another word for centrifuge. A washing machine does this as one of the last parts of the wash cycle. The drum then spins as fast as it can to squeeze as much of the remaining water out of the laundry as possible. After the centrifuge/swing, the water is pumped off. Most washing machines today also have the option to spin and drain only. This can be useful, for example, if you have washed something by hand, and it only needs to be wiped dry. Centrifuging is also often the part of the wash cycle where the washing machine gets loudest.