'Necessary' is a strong word. Necessary for what? For survival? Hardly. To maintain one's esteem by belittling, 'proving', etc.? Perhaps.
Personally I see little difference between theists claiming superiority to atheists, or atheists claiming superiority to theists. The psychological need is the same. Generally it comes from one's own doubt on their own stance. Verbalising, "I'm better' helps to alleviate that doubt, or at least that's what the subconscious is telling you.
Also, it's definitely not all atheists, nor all theists. Plenty of people have no desire to get into this comparison.