Star Trek was always a very fascist dictatorship-esque vision of the future. What you wear is dictated by a central authority. "Primitive" cultures are deemed too inferior to be permitted to decide their own future, so it is decided for them by the Federation. Most of the worst anti-human flaws of current time are not simply maintained, they are amplified and made so oppressively constant that they disappear unless you're looking for them. And, as is actually said directly several times, humanity has 'improved' to the point where they are perfectly happy to live with extreme restrictions on even the most mundane freedoms, so long as they are handed down by a militaristic hierarchical power structure.

There is a degree of limitation imposed on anyone trying to create popular entertainment. You can't be too imaginative. There are many aspects of human society that modern people believe are 'natural' and endemic to human nature, even though even cursory glances at history show those exact things to not only be 'not natural', but exceedingly bizarre. If you line up the social mores and values and the like of every culture that we know has ever existed, you can spot things which are common to all cultures, and you can spot things that are strange aberrations that emerged and eventually went away. And, you can see several aspects of our culture that are so diametrically opposed to the common components of every culture ever that it's very foolish to imagine that our wholly unique take on the matter will endure for long.

Science Fiction is fascinating, but often disappointing when presented for a popular audience. For a popular audience, you can't question their basic assumptions. You would not get too far presenting a decentralized society which understands that centralized control of power is a guarantee of abuse and tragedy. You can't show a society where sex is used as a basic social interaction. And a society where eating is treated as stigmatized and for-marriage-only as many see sex today would simply be confusing (even though there are tribes which adopted exactly this practice, believing eating around others to be inherently extremely shameful, something only to be shared with someone you are married to).

And, if the creators look at history and they see the aesthetic of military organizations doing a lot, it makes sense that they would presume that in the future all of the 'important' stuff would be handed over to militaristic agencies. That smacks of a complete lack of understanding of WHY military agencies are structured in the way they are. The military does not adhere to rigorous discipline because that is an effective way to accomplish general human endeavors. They do it because committing violence against other human beings is extremely difficult to get human beings to do. And when they do it, they are torn apart with post-traumatic stress disorders, depression, anxiety, and all sorts of negative effects. In order to be able to overcome the conscious brains prohibition on violence, soldiers must be trained so that their muscle memory can kill before their conscious mind can prevent them from doing it. And sticking to a simple routine with no allowance for individual diversity and the like makes it easiest to continue functioning in traumatic situations. These techniques don't work in any other human endeavor at all. They are exclusively useful for the purpose of getting human beings to kill other human beings. That is certainly an arguably useful thing (another topic entirely), but the techniques do not extend to non-soldiers.

Humans function very poorly in situations where their freedom is significantly hindered. This is why there has never been a successful dictatorship or fascist regime that lasted. People naturally, even subconsciously, resist being controlled. And people put in control of others suffer just as many negative psychological effects as those they dominate. The reasoning, or sensibility, of the rules do not seem to matter. Whether you are preventing someone from drinking a bottle of poison, or forbidding them from considering an alternative political ideology, the result is the same. On the societal scale, restriction leads to self destructive behavior, gang behavior, and eventually revolution. We see this in prisons, we see it in restrictive nations, etc. The same pattern repeats over and over again, and mostly people take away 'oh well, that wouldn't happen if the people involved were better people' or 'that wouldn't happen if the rules were better'. It would. It always would. No system, no matter how complex, can possibly account for human behavior.

Anyhow, older scifi is at least slightly better than modern. Watch a modern scifi show. See how many episodes follow this pattern: 'Smart' character has idea. 'Not smart' but intuitive character warns that the idea might be dangerous. 'Smart' character ignores the warning, and leads everyone into lethal danger. A character, usually military, follows his gut and saves the day.

You'll find it difficult to find any modern scifi that does not fit this formula. The hero is always the person who is "reasonable" by ignoring reason, and who refuses to carefully consider the situation, just going with their gut. And, of course, pretty much every single scifi show presents the military as the savior of all humanity. I especially loved watching the first episode of that new terrible show 'Terra Nova'. They go back in time to 'start over' and right all the wrong choices humanity made. This time they're not going to screw it up. Oh, and how is this announced? By an unelected military god-king who controls every facet of the lives of every person there. Right, off to a roaring start, throwing away all that 'democracy' hoo-ha and giving all control to people whose training was designed solely to teach them to kill most effectively when needed.