Earlier quoted context omitted.
Perhaps this is controversial, but I think this is a mostly male way of expressing affection. Women observing this sometimes conclude that men are horribly cruel to each other.
Only some kind of men behave like that. I had many friends growing up and we never did that sort of thing, and it always put me off to see people who did.
They never directed any of it at me because they were emotionally intelligent people, but even so, I did find it kind of annoying and off-putting - it was just a legitimate cultural difference.