It’s also the only credible answer to the Fermi paradox. Any civilization advanced enough for interstellar travel is advanced enough to generate all of their desires at home.
That's a nice tangent there, but for that to be a credible answer we would have to assume that any and all advanced civilizations would not want to try interstellar travel. That's the thing with this paradox, it would theoretically only need one to diverge from the norm to see it's effects.
Which I believe is also why most great filter candidates are usually not things that a species would do by choice, but instead an accidental, inevitable or inherent feature of the universe/existence.
Basically nothing in Star Trek makes any sense, as far as the social consequences of the setting. The writers are constantly having to struggle with it. You've got the original series' pretty strong but apparently-accidental dystopic vibes, constant trouble with sorting out how the whole "the Federation doesn't have money" thing works[0], holodecks only rarely having the kind of effects everyone knows they would, and so on.
[0] Some major Tenacious D "City Hall" vibes with how well that part of the setting works. "Third decree: No more rich people, and poor people. From now on we will all be the same! Umm... I don't know, I gotta think about that...."
>So then why did Star Trek happen if they had replicators?
Because when you have everything you poke around for fun. Kind of like how science was pushed along by bored aristocrats doing it as a hobby for centuries.