When I was growing up it was often assumed that a heterosexual man would not be platonic friends with a heterosexual woman unless he had some romantic or sexual attention. Women were expected to "know better" and were often blamed for being both cruel and clueless. It was my fault for asking the guy "can we just be friends because I value your friendship, even if I am not interested in romance" and him saying "sure".
I had hope that the younger generations would be more progressive.
I am sorry you had to go through this and hope you find a better work environment.