To get this straight, you see the state as representing a national community, and you see this as essentially legitimate?
That would be to infer more than I said,
ie, that governments tend to be formed.
Legitimacy...
I'd say that's a variable thing, depending upon
the extent to which the populace is served &
represented.
No matter who's in charge, be it a dictator, a group of oligarchs, or the liberal ideal of republican politicians selflessly serving their electorate?
That would be too sweeping a claim.
The only meaningful definition of socialism is essentially that used by Marx and Engels. Other definitions are generally hopelessly confused: some (like yours) seems to have some idea of state control of the economy; yet communists are opposed to the state, so how can this be?
Communism without a state on the scale of a country
is analogous to entropy decreasing in a
Scratch that analogy....it would elude too many people.
Suffice to say that a country the size of USSR will have a
government. The odds otherwise seem vanishingly small.
So either communism cannot exist as originators envisioned,
or it would exist with modification, ie, the government
essentially acts as &/or on behalf of "the community".
Note a standard dictionary definition doesn't disallow government.
And self described socialist & communist countries seem to follow
common usage definitions rather than arcane age old technical ones.
Definition of communism | Dictionary.com
a theory or system of social organization based on the holding of all property in common, actual ownership being ascribed to the community as a whole or to the state.
(often initial capital letter) a system of social organization in which all economic and social activity is controlled by a totalitarian state dominated by a single and self-perpetuating political party.
(initial capital letter) the principles and practices of the
Communist Party.
'Socialism' has come to mean anything and everything slightly different than the general American economic model (and sometimes even parts of the States' government is called 'socialist', e.g. when referring to welfare).
As defined in dictionaries, socialism, communism, & capitalism are fully
independent of the existence of social welfare programs. And I've long
argued that capitalism is the best fuel for them...& politically useful in
keeping the peace...& inevitable in a democracy.
As you seem to have realized, no one seems to have any real sense of what 'socialism' is, and can't decide if it includes Norway, Cuba, the U.S.S.R., North Korea, and Bernie Sanders all together at once or not. So when referring to socialism (that is, communism), I use it in the sense that communists themselves mean it.
I see who is, & who isn't with greater clarity by applying a
dictionary definition. It simplifies everything.