Part of being socialized heterosexual often means having resistances against homosexual attraction. A heterosexual trying to treat homosexuals fairly needs to overcome these feelings. Racism is different: it doesn’t stem from our resistance to attraction but from something closer to nepotism — a feeling of comfort and trust we feel towards those who fee like they are members of our family.
Both homophobia and racism are different from sexism. If you’re heterosexual you can go through life without ever wanting anything from those of different races sexual orientations, but you want something of the opposite gender — love, sex, perhaps a life partner — and can be frustrated if you don’t get it.
This is just to say that the goal of treating other people with justice, love, and respect can fail in a lot of different ways. It is under attack from a lot of parts of our psychology. Disappointed love can tempt us to be sexist. Loyalty to our family can bend us towards racism. The deep psychology of our sexuality can incline us towards homophobia.
And that’s just to say that avoiding racism, sexism, and homophobia is an adventure of self-discovery and self-conquest, one which requires examining hidden parts of the self and growing in the direction of our deepest desire to love and connect.