I'm just going to quote one of the billion posts I've made on this subject because I'm tired of rewriting this stuff over and over:
The USSR, PRC, etc. developed as they did for specific historical reasons very much in opposition to the basic foundational elements of Marxist theory. For example, Marx believed that socialism would emerge in the most advanced western capitalist states first, because it was precisely there that the class struggle between the proletariat and the bourgeoisie would be the most heightened. The very struggle between the classes is what would solidify the proletariat as an organized bloc fighting for its own interests. However, since the capitalist countries a.) gave in to various reforms on behalf of unions and b.) developed overall higher living standards due to super-exploitation of third world colonies, this stunted revolutionary fervor.
This did not happen in the less advanced countries. The Bolsheviks and other socialists successfully obtained the allegiance of the proletariat (though much smaller than in the western European countries) in the Russian Empire, but the civil war obliterated the entire class and infrastructure. Russia started off from a zero point, with a largely backwards peasant population, and no longer in any way resembled the kind of society that could achieve socialism, because socialism develops as a result of capitalism. Convinced that the capitalist powers would try to intervene (again) in the USSR, the Bolsheviks - who had already clamped down on power due to the revolution and war - instituted the NEP to try to rebuild society via state capitalism before a transition to socialism proper could begin. Once Lenin died, Trotsky, Stalin, and Bukharin all led various factions to figure out how to proceed and due to various circumstances (obviously often bad ones) Stalin won and proceeded to reshape the USSR.
Every other socialist state followed that model because the USSR was the predominant socialist world power, despite the fact that it had veered way off course from the actual underpinning tenets of socialism. Most of these states were underdeveloped due to colonialism and were seeking a path to quick development (think of the PRC for example, whose class war does not follow traditional Marxist proletariat-bourgeoisie-conflict theory at all but was basically a huge peasant uprising). In other words, while Marx proposed that socialism emerges because of class conflict between worker and owner, in the 20th century what we saw was political parties inserting themselves in the role of the proletariat in its absence.
And even then not one of these nations or parties claimed to have achieved communism.
To put it shortly, Communism is not communism, and the history of the 20th century Communist movement is littered with failures because the material conditions were not yet at a point where socialism could happen.
Also, "human nature" is an ideological concept, not a scientific one. What is "natural" to humans, curiously, changes according to the needs of the ruling class of a given period. It was once assumed that women were naturally docile. That black people made natural slaves. That some people were born to rule and others were born to serve. The idea that humans are all "naturally" greedy and looking out for themselves flies in the face of humanity's entire hunter-gatherer prehistory and existence as a social creature. It makes perfect sense as a condition that arises under the constraints of state society that developed after agriculture. Even so, when humans are given sufficient resources, when their material conditions are pretty well met and there isn't a lot of stratification going on, they can get along just fine. Look up the Cucuteni-Trypillia culture.