For instance friendly teasing, sometimes even started by the person themselves (e.g. "Oh, you know us [blanks], good at [blank]") can be taken way too far. People wrongly get the sense that something is OK because the person doesn't complain or laughs along and it can escalate to the point of full on harassment and your brain still thinks "[person] is my buddy, it's OK". I think it's partially human nature and wanting to fit in. The person being teased doesn't want to come off adversarial, the person teasing thinks it's "their joke".
I realized long ago simply don't tease people at work. They are not around you by choice. Don't assume people at work are friends in the way your drinking buddies are friends. You honestly have no idea how they really feel about it until it's too late, save it for your friends who are around you by choice.