What does it mean when a guy uses you to piss off another girl?

Anonymous
I have a friend and we are very close friends, we live in the same city and we know each other from college, but we never see each other because he dropped out of college, so we started to be long distance friends or chat buddies. He has had several girlfriends and I have no idea why they all hate me. for no reason and no sense. to the point that I don't even formally know them. I have never ever met any of his girlfriends and I know about them because he usually chats things like "talk to you later, I'm with my girlfriend and you know she gets mad if I talk to you".

One day he broke up with his girlfriend and a few hours later he posted on Facebook that he was in a relationship with me. And his other friends get in on the joke to congratulate him just to piss her off.

I felt bad for the girl and angry for his childish behavior. I fought with him because even though the girl hated me it didn't seem fair. Besides, why did he use me to annoy her?

The worst part is that I have witnessed this kind of behavior in guys very often. What's the need to do things like this?
What does it mean when a guy uses you to piss off another girl?
6 Opinion