Old joke time. How can you tell Star Trek is the best example of science fiction around?
Answer: Socialism works.
LOL! I'm not a fan of anything but TOS. But supposedly there was an episode on one of the later series where a guy from the 20th century was sent to the future. He was curious how his investments were doing, and was told "we don't have THAT system anymore".
Right. I'm sure that in the 23rd century they still have some form of compensation. Do you think that a starship captain would work for the same number of "credits" as an ensign? Or the guy who cleans the Enterprise's toilets. Don't think so.