This was me, and it was one of several factors in the destruction of my marriage. As a kid, I did well in school, without much effort. However, I did not do well socially or athletically, so I got my affirmation for having the right answer. Although I slipped academically in university, I regained the success in later years, but still struggled in other areas. I was not affirmed for simply being'.
When I started dealing seriously with my shortcomings, I had to admit that I had been seriously wrong about some things. This, combined with a right understanding of God's love for me, helped break the 'need' to be right. Now I freely admit being wrong, or possibly wrong, for although I still strive to be right I won't always be.
Of course, that's just my story. Others may have different explanations for theirs.