It doesn't switch, it's whatever your brain is guessing based on a black silhouette with no depth perception. Look away from the screen and imagine the exact same image spinning the opposite direction. When you look back, she'll be doing it.
The way this works is that both sides of the image (and both directions of the rotation) are perfectly symmetrical. Your brain can't get depth perception from a flat, black image, and it can't infer the direction of spin because both are equally plausible, so it picks one and runs with it.