Why did I feel rejected even though I didn’t even like the guy?

So I noticed that like I was in a restaurant with a mixed group and my friend left I was confused whether to go with her. I chose not to.

her friend a guy looked confused about why I didn’t go.

a few mins later he randomly got up and left.

I don't know why I felt like he was just trying to leave/get away before he would be forced to socialize or talk to any of us, including me

Updates
2 h
I don't know why my gut feeling was he thought I was interested in him when I didn’t leave with my friend and that’s one of the reasons he abruptly left
Why did I feel rejected even though I didn’t even like the guy?
Post Opinion