Great Sci-Fi is about the present. Whether addressing general inequality, sexuality, norms, political conflict, terrorism, the nature of power, or whatever other bees angrily circle out bonnets, it places contemporary problems in the future. There, characters can hash it out using fantastic technologies and hide behind applicability or metaphor.
Because of this Sci-Fi authors and audiences tend to be dreamers. Many have suffered from some kind of persecution themselves, or at the very least feel like square pegs. There is something egalitarian about Sci-Fi… something that lauds the individual.
So why is there so much sexism and racism in the Sci-Fi genre?