I used to know a girl who did this. It seems that she thought by telling her boyfriends that the dudes she’s hanging out with are gay, or would be less threatening to the boyfriend because the gay friend wouldn’t hit on her.
Except the dudes definitely weren’t gay and she was lying AF.