Studies show that most of us have a tendency to overrate, overestimate ourselves in comparison to others. For example, 93% of US students estimated themselves to be above average drivers. (How is that math possible?) In a survey at the University of Nebraska, 68% of faculty rated themselves in the top 25% for teaching ability.
Some researchers call it "Overconfidence Bias." Others refer to it as "Illusory Superiority." These speak to a tendency Jesus addressed in the parable of the Pharisee and the tax collector. Luke introduces the parable by saying: "To some who were confident of their own righteousness and looked down on everyone else, Jesus told this parable..." ( Luke 18:9).
Only one of these men goes home justified (in right standing with God) and it's not the Pharisee, the one everyone would have assumed was good with God. Why? Because those who exalt themselves will be humbled but those who humble themselves will be exalted.
Paul hammers home a similar point. If we are saved by faith through God's great grace, why would we ever judge another and why would we ever boast about ourselves. Boasting is great, but only when rejoicing about what God has done.