Recommended Reading: The Glory of Systems, Intellectual Hipsters and Meta-Contrarianism
An idea I've been kicking around awhile is that contrarianism arises, in part, because of differences in systematization between individuals or groups. What I mean by this is that certain people are much more concerned with explicitly laying out the reasons behind their actions, beliefs, and behaviors than others. When this happens (particularly if the less systematizing people happen to be older or in a position of greater authority), contrarianism is a common response.
Perhaps contrarian isn't the right term. What I'm trying to describe might be contradictorian. Basically, an individual who goes out of their way to question your intentions and poke holes in your argument.
This was precisely me before my parents accidentally introduced me to Objectivism. I didn't have satisfactory answers to any of life's questions, but so far as I could tell, neither did anyone else. And because middle school me was a total nerd, that was a problem. I wanted explanations, desperately. I got into plenty of losing arguments trying to show other people that theirs were insufficient.
Part of the reason nerdy people get into weird belief systems, from the occult to Ayn Rand, is because those systems provide at least superficially complete worldviews. Many of them paper over important questions or internal contradictions, but they're a level or two higher than the soup of contradictions doled out by the schools and what's left of Christianity.
I'm not sure this is actually a bad thing, but then again my contrarianism eventually sent me back to the center after realizing how little certain anarcho-capitalist types care about consequentialist concerns. Based on my limited observation, the usual failure mode is to keep going up a notch until your peer group is all equally satisfied and nobody questions anything further. I was lucky insofar as someone sufficiently sideways of me to not pattern-match as "enemy" showed me new alleys of inquiry. If that hadn't happened...who knows.
At the very least, keep this problem in mind if you have children.