Why would a guy act friendly one day and super professional the next?

Anonymous
This guy at work is a couple years senior to me. One day he'll act very friendly, talk and chat like good friend, and the next day he'll be super professional, sticking to the point and acting like just strictly co-workers. And this repeats for days. I'm confused how to behave with him
Why would a guy act friendly one day and super professional the next?
4 Opinion