I think you're missing the point of the above commentator, or somewhat superimposing your own. Just as with the technology, there's a serious amount of handwaving that goes on from the writers regarding the economic functions of the star trek universe. Since scarcity does exist in the Star trek universe (not everyone has their own planet, starship, and holodeck yet), it should be dealt with. Admittedly much of the drama of star trek is concerning things that have little to do with anything really economic, and as Star Fleet is a military organization it can leave certain things behind the scenes just as many of our present and past military movies do - but just as with the technology, it would be nice if there was a little less handwaving and a little more thought.
And by the way, study history. Capitalism IS teh best. Pretty much every totalitarian ideology has had some aspect of socialism at it's core, just because it can't stand to leave the economy alone - and every implementation of socialism has involved meddling in plenty of non-economic affairs, because the politicians can't resist. And also, there are plenty of capitalists who have motives that are entirely non-economic, but who realize that the more free our markets are, the easier it is to implement just about any other socially magnanimous change they strive for.