The main reasons for judging others is a lack of understanding, perceived views from experience or upbringing or a lack of empathy and compassion.
Perceived views and lack of empathy and compassion are largely learnt and built on behaviors stemming right from our childhood and upbringing.
As parents, we have a responsibility to teach our children about differences, educate them about others so they have a genuine understanding and build on their empathy and compassion. We can teach our kids how to be non-judgmental.