People are giving you the easy, commonplace and predictable answer and that should worry you. Although it CAN be insecurity or fear or ignorance or anger or whatever it can also be a bona fide contempt for genuine stupidity. Sometimes harsh judgments are entirely justified, and for this question, like many here, there is no set, simple answer that applies in all cases. As unsatisfying as "it depends" may be as an answer - it's truly the case. Depends on the person and depends on why they are reacting to you harshly. Is it because they are way off - or is it because you are?
This is why I don't like to answer generic questions like yours. If you'd stated a specific example maybe I could have a more specific answer. Maybe they were right to criticize you. Maybe not.
When people answer generic questions with specific responses like above you should be wary. It often reflects common myths or more about their worldview about the situation at hand.