Why would a colleague be super friendly & flirt wildly with me but change around his friends who are petty & make fun?

Why would a colleague be super friendly & flirt wildly with me but change around his friends who are petty & make fun?
Post Opinion