The Federation has an virtually unlimited energy supply because they mainly use very efficient energy sources. And then they have the ability to turn energy into matter and the other way round.
That's why there's no need for money at all.
The idea that people won't work if there's no money, and that people are somehow "better" if they work more and make more money, is a very capitalist one. People will simply do what they want, that's cool, isn't it? And with the right education, inspiration and motivation, you're not just jerking off to your WoW avatar. There would be a lot more artists, a lot more researchers, and a lot more service jobs.