If that room were--say--the ladies' restroom, then yes, I can very much imagine a situation where such a thing were very clearly sexual harassment.
I didn't say there was no reason a man should go into a ladies room. I said that it's easy to imagine a situation in which a man entering a ladies room would very definitely be sexual harassment. Like, you know, chasing after a specific woman.