Most dirt on clothes is oily and sticks to the fibres of the cloth, often deep between them. Soap cleans by forming micelles: the hydrocarbon tails of soap molecules dissolve in the oily dirt while the ionic ends stay in the water, and the oil is collected in the centre of the micelle and held in the water.
For this to happen, the soap solution has to reach the dirt and the dirt has to be pulled off the fibres and broken into small droplets that micelles can surround. Soaking alone does this only very slowly. Beating, scrubbing or agitating:
- loosens the dirt and pulls it away from the fibres;
- breaks the oily dirt into tiny droplets, so that soap molecules can surround each one and form micelles;
- keeps bringing fresh soap solution into contact with the cloth and moves the dirt-filled micelles away into the water, from where they are rinsed off.
So the student is only half right: soap provides the chemistry that holds the oily dirt in the water, but agitation supplies the mechanical action needed to get the dirt off the cloth and into the micelles in the first place.

A soap molecule and the micelle it forms around a droplet of oil.