When I google for this I just get stuff about whether or not the Coriolis effect makes it go clockwise or anticlockwise, but I don't care which direction it turns in. I want to know why it turns at all. Why doesn't the water just fall straight down the hole?
One wrong theory is that air wants to return up the pipe, but that only applies if there's a closed vessel like a wine bottle at one end of the pipe or the other. My bath drain empties into the back garden and the air can return via the bathroom window.
Another is that pre-existing rotational currents in the bath get amplified as the water is drawn to the plughole just like a ballerina pulling her arms in, but there are two problems with this. Firstly, under this theory you'd expect the speed of the vortex at the plughole to be proportional to the speed of the pre-existing currents, but experience suggests that every plughole has its own favourite speed that depends on its geometry, the water depth, etc, so that you get pretty much the same speed whether you stir the bath a little or a lot. Secondly, by leaving the tap running (taking care not to inject angular momentum) we can keep the vortex going forever, but if the only driver was the pre-existing currents, then surely they'd be depleted by viscous friction and falling down the plughole. Some other effect must be driving the vortex continuously. There's energy available from the loss of gravitational potential energy of the water, but why does it get turned sideways to make this vortex?