In each instance.... In exchange for what?
An excellent question. The very lack of advanced capitalist development that enabled the first socialist countries to leapfrog over those countries with more to dismantle and become the first to embrace socialism took its toll in the form of continuing backwardness that socialist construction isolated from the mainstream of world economy was insufficient to overcome, and counterrevolutionary political struggles that crystallized this backwardness. In the examples given above they took the form of
Russia: the self-determination and equitable treatment for all nationalities pioneered by Lenin (already breached during the Civil War with such programs as decossackization) were sharply reversed and the old Czarist-era policies of Great Russian chauvinism and antisemitism revived. Likewise, Leninist feminism was pushed back by a revival of patriarchy and Leninist democratization by the restoration of capitalist-era autocracy. In all cases, these reactionary political currents were magnified by a state increased in size and power by the conflux of an immature socialism highly dependent on technical expertise and by the intense class struggle to what amounted to industrial replication of oppression on a scale impossible for the less socioeconomically advanced countries (a pattern repeated in all the other socialist countries). Secret police terror, the horrors of the gulag system, and agricultural backwardness (eventually coupled with industrial backwardness as the Stalinist regime retarded the development of socialist industry) contributed to decades of misery despite the tremendous boost the revolution gave to productivity and living standards. The eventual restoration of capitalism was the culmination of backwardness’s revenge on progress and led to a further intensification of censorship and repression and to skyrocketing poverty.
China: backwardness took the forms of ongoing high illiteracy, a Byzantine maze of bureaucratic dictatorship, vicious repression, slave labor, concentration camps, and ongoing exploitation of workers and peasants including the 2nd-deadliest famine and 2nd-biggest mass killing in China’s history. The increase in living standards for hundreds of millions came at the expense of tens of millions more who were left behind. The backwardness, class contradictions, and counterrevolutionary dictatorship conspired to result in the eventual restoration of a predominately capitalist economy, although due to the huge advance in industrialization under socialism and the world’s consequent dependence on the Chinese market, and to the continued existence of a large socialist sector, this did not yet have the negative effects on the standard of living seen in places like Russia.
Cuba: Cuba paid the price in terms of continued industrial backwardness, low-quality housing, chronic shortages of consumer items, and abuses such as censorship, one-party elections, and in the worst few years slave labor in concentration camps. Cubans also paid the price by being the country hit harder by terrorism than any other country besides Israel and Nicaragua. The collapse of the Soviet Union which had allowed Cuba to develop relatively rapidly and freely led to a harsh economic crisis during which some of the evils of capitalist Cuba, such as prostitution, began to reappear, and to a retreat toward capitalist values and methods that have led to an ossification of dictatorial government and bigger class differentiation.
North Korea: the country suffered terribly from being bombed, its villages strafed, its best and brightest decimated by war. A harsh dictatorship with brutal torture, concentration camps, and extremely strict censorship were put in place, accompanied by an inherited caste system, and the self-serving and foolish decisions of the rulers led to a sharp reversal of the country’s early economic dynamism and eventually to a series of food crises as the country threatened to collapse back into capitalism.
East Germany: low-quality housing l, consumer shortages, and harsh dictatorship led to an inability to resist assimilation to the German Federal Republic, which imposed further austerities leading to big rises in unemployment and poverty and to the reemergence of homelessness.
Albania: the country remained backward, isolated, and subject to harsh secret police measures. Factories were inefficiently based on primitive technology. Much of the wealth accumulated by the workers under socialism was robbed from them by officials of the government of capitalist restoration, which of course restored taxation as well.