Unfortunately, it also has to do with a person's upbringing. If
you keep telling your children to despise other races, be it
tacitly or openly, chances are that they'll end up following your
actions and thoughts.
For example, if you tell you children to not mix with Indians
because they're 'smelly', Malays because they're 'lazy', or Chinese
because they're 'devious', then it's not surprising if your
children will think that that's acceptable behaviour and grow up to
be racist bigots.
My father has often shown disapproval when he sees me hanging
around with my Chinese peers (I'm Malay). Once for Racial Harmony
Day I prepared my spare set of baju kurung for one of my Chinese
friends to wear to school. When he saw me doing that, he sneered at
me, "Why on earth are you doing that?!?! What's so great about
these Chinese anyway?!?!"
I brought it to school anyway and lent it to my friend.
That was one of the few times that I am actually glad to defy my
father.