You don't know that. It is an unreasonable and unfair assumption, and reflects the expectation of your own immaturity as a gold standard.
The fact that we need to suggest social education to educate professionals in the workplace about when a person is not interested in them is kind of shocking. It should be considered basic communication skills.
I have had crushes on various females since primary and secondary school. The first one or two instances you could almost say I too had harassed someone. It wasn't until I had more experience "advancing" I finally got when girls want you to continue and when they don't. Not everyone is lucky they pick this skill up early, even as I wish I got the hang of it earlier than I did.
And this isn't a case of not knowing how to act socially, it's actual aggression and harassing behaviour when he doesn't get what he wants.
On a side note, there are formal communication skills courses in education. My university had a course called "Communication Skills for Engineering" or something like that. It was a mandatory short course for anyone in engineering, maths and computer science.
You don't learn that in engineering communication courses.
The way the man acted is like a child throwing a temper tantrum, because that is exactly where his skill level in managing his emotions is when dealing with women!
You have no solution besides shaming and locking up men who are harassing women. Is it working? Women are getting harassed and men are getting shamed. If that's your ideal of male-female relations then I suggest it is you who has a problem with not wanting to find out the root cause of societal issues, and enjoying the shaming and denigrating socially inept men as a hobby at the cost of other women who are getting harassed. Revenge is fun, I get it, and helping other women who are harassed can feel good too, yes. That doesn't mean solutions to reduce the propensity for men to harass women shouldn't be explored.
We could focus on the women and you'd complain it's men who needs to change. Focus on the ways to change men and you're complaining we aren't focusing on the women.
I hereby put my hands up and give up caring about women I don't know being harassed. They can solve their own problems and me caring about it only gets me attacked personally, no matter what ideas I offer. Seems like the only behaviour you'd suggest is to have a negative outlook towards men and that not something I'd agree with. I have a pretty good guess a lot of harassment comes from a man not knowing how to deal with women, because it's something that happened to me. Instead of willing to consider this viewpoint you dismiss the idea completely and go after me and my logic. You have a strong track record and you don't need people like me to tell you what's happening.
It will be for the best.
As long there are "wanted advances" in workplaces, there will be "unwanted advances" also. To eliminate "unwanted advances", you must eliminate "advances" in general. For example: if she found him hot, we wouldn't be reading this post.
As long as "advances" are still permitted in the workplace, there needs to be social education in the corporate environment so that "brush-offs" aren't interpreted as "try harder".