Why is he rude to my friends?

This guy he’s been nice to me, well to my face but I noticed he can be an a-hole around other people. So it gives me anxiety whenever I’m 1 on 1 with him because I feel as if he is judging and will use whatever I say against me in the future. I had a social event I had to go to it was mandatory for me, and he was going to be there. So I brought my friend with me as a way to help me feel more comfortable. And apparently he was saying rude comments to my friend I didn’t find this out until later. Throughout the event we did not speak we didn’t even say hi, we just made eye contact quite a few times but neither of us approached each other, and he just told me bye as I was telling everyone I was heading out. Why would he be rude to my friend he never met?
Why is he rude to my friends?
Post Opinion