Star Trek TOS was not overtly liberal. That is mainly because the world of the Federation was never really defined or explained. However, in Star Trek TNG, the future is apparently a communist one in which people don't need money and are happy in their jobs and find recreation through virtual reality simulators.
Also, the OP said "so many" sci-fi films are liberal-not "all".
Gene Roddenberry created (or inspired, in the case of the later series) all of the Star Trek series. He was an atheist and a progressive. (I enjoy all of the Star Trek canon immensely, with the exception of DS9, btw...but it is what it is)
TOS was a series that was produced in the mid 60s, so its unlikely that the NBC censors in that day and time would have allowed it to push the envelope as much as Roddenberry would have wanted. There were, none the less, many extremely liberal aspects to the series, particularly the world government (expanded to interstellar extremes).
However, in Star Trek TNG, the future is apparently a communist one in which people don't need money and are happy in their jobs and find recreation through virtual reality simulators.
That was due to the invention of "replicator" technology that eliminated scarcity.