Just not ok

The same 70 year old woman (see previous creep story) told me two days ago that another man said at the gym if she put on any weight he’d spank her bottom.
He knows she’s married he’s met her husband and she’s met his wife.
She was a bit alarmed but keeps making excuses for comments like this about how he’s only joking, it’s meant to be flattering etc etc.
I wish she wouldn’t keep making excuses but she grew up in a different time and can’t get out of the habit. But I could see from her face that she was disturbed by his behaviour as they’d always been polite and friendly till now. He’s just ruined it. She said she didn’t really know what to say but told me as she doesn’t want to tell her husband, so now that’s a secret she has to keep from him if they meet up again.
Why do some men do this? It’s not attractive. It’s harassment.