It makes absolute sense, because being quite clear that no men are allowed in strengthens women's position in several ways:
If they see a man going into the Ladies', they know he's up to no good and can phone the police, round up some help or at the very least warn other women not to go in.
If there are several women in the toilets when he comes in, they can challenge him and/or fetch help, or get themselves out, before he does anything. Even a lone woman will know at once that he's up to no good and so may have a better chance of escaping in time.
Any member of the public who is asked for help knows that the woman who asks is in the right and that they are in the right to help her.
He has no excuse to go in and hang around until he catches a woman or girl on her own, which makes it harder for him.
If a woman or girl is caught alone and molested, unless he actually murders her, she is in a much stronger position to be believed, because he wouldn't have been in there at all unless he was up to no good.