Why do guys try to act so cool when they are with their friends?

Guys, you tell me !

Theirs this guy I like...hes polite when my friends and I are around him when his friends aren't around.

But the minute he's with his friends he turned into a jerk.

Why do you guys just change that way?

An example? I was walking back to my friends house and my crushes group of friends were with him and hey were heading in the same direction as my friend and I. These boys were trying to act so "cool" when they were together.
My crush kept on pushing his smaller friends and when they couldn't see my friend and I they all shouted BRAINER out loud to make my friend feel like crap. My crushes friend started a rumor about her. It upsets me so much how they think their awesome..