Another relevant factor may be that a female teacher, in a school where both sexes whack pupils, might feel an obligation to show the world that a whacking from a woman teacher is anything BUT a soft option.
In practice therefore it may well be that a girl pupil is better off bending over for a male teacher than a female.
However, if the male teacher is sexually frustrated (notably by erectile disfunction), he may see the cane or slipper as a penis substitute and may use it to elicit from the girl the cries and moans he’d love to be elicting with his willy if only it would work and he had someone to use it on.