I think Trek's United Earth concept is 45% philosophy, 35% practicality, 20% politics.
Most of the idea seems to leans towards cultures/nations needing to learn to get along in order to advance.
I take this to mean that a lot of religious, cultural, and behavioral baggage from around the world will have to be left behind in order for that to happen.
In one episode, having only one planet-wide government was a basic requirement for Federation membership. If a culture didn't have one, they were generally ineligible to join.
It would probably drives conspiracy theorists crazy, but how else would humans finally "get there"?