Psychological reason for posturing?

No.10929959 ViewReplyOriginalReport
So I am in a stem major and there seems to be two kinds of people, for the most part. Person A has a stick up their ass, has to be right 24/7, and has a meltdown when they turned a paper in late. Person B thinks it's hilarious to be a fuck up, will openly talk to people about their said fuck ups, and proceed to treat you like a try-hard if you are not the same.
Why are these a thing? What is the point of behaving like this in a social context? I understand why you might be doing poorly, or be working hard towards your goal, but why include a social facet to it? It's not enough that you are a tight ass, but you need to say it. It's not enough that you are a fuck up, you must proclaim it.