Star Trek very much embodied what liberal American white males of the 1980s and 1990s thought the future would (or should) look like: secular, sexually liberated, humanistic, meritocratic, equitable, and technological. In this world, religion plays practically no role in public life. Problems are solved with diplomacy instead of violence. Money doesn’t exist, so there is no capitalism, greed, or want. People spend their lives bettering humanity and doing other such noble things like negotiating peace with aliens or exploring the universe in one of Starfleet’s advanced starships. Men do most of the work; they advance through meritocracy; and there is something akin to a fraternal culture, irrespective of the prevailing progressive ideology.
In the diverse world of Star Trek, the white writers imagined meritocracy would ensure whites like themselves would still have a position at the top of society despite soon becoming a minority in real life America. You’ll notice progressive humans are at the center of the Federation in Star Trek despite being a small minority in that fictional universe as well. That’s by design, conscious or not. You can tell the creators desperately wanted to believe this sweet little lie about diverse societies. I’m sure they imagined their tolerance would be reciprocated when they were on the receiving end; we now know that’s not true. Remember, this was the generation that famously cheered President Bill Clinton’s college commencement speech where he lauded the idea of America soon becoming majority minority. The primarily white crowd roared in approval. In this imagined future, white liberals would still get to feel morally superior to contemporary white conservatives, just as they often strive to in today’s world. This is accomplished through various means – cooperation with hostile aliens (demonstrating philosophical supremacy, superiority of intellect and temperament), bravery, tolerance of differences in others, multiculturalism (the show almost never celebrates an earth holiday like Christmas but often supports alien cultures, including breaking Starfleet’s rules of dress for aliens), standing up to corrupt superiors (usually white conservative caricatures).
Star Trek was very much a pre-Millennial liberal morality play whereby inspired characters (mostly white) would often stand up to authority figures (mostly white) in order to promote a general moral code among fellow whites. Basically, it was what white male liberals of the time hoped the future would be. “Threatening” minority characters would act safe and white, technology would trump superstition, and reason would prevail over emotionalism. The future would be a paradise where all problems had been solved and white men would still have a place at the table they created – it being governed by the same rules they originally put into place. But as America’s demographics have changed, so too has the ethos of the Star Trek franchise. – https://www.unz.com/gdurocher/divine-right-on-the-collapse-of-star-trek/