- Those countries were poor and without sufficiently established democratic institutions.
- Those countries had to immediately mobilize to defend from richer capitalist countries (lead by the US) trying to undermine them in any possible way. Constant defense mode leads to totalitarianism.
That doesn't mean that socialism requires totalitarianism by nature.
In fact, the only significant difference between capitalism and socialism is a democratically controlled workplace, which is inherently less authoritarian than capitalistic totalitarian workplace governance.
It's also ironic how people constantly conflate "democracy" and "capitalism" on one hand, and "totalitarianism" and "communism" on the other, while completely accepting totalitarianism during a significant portion of their life -- their workplace.
>> Only now can we fully appreciate the correctness of Engels' remarks mercilessly ridiculing the absurdity of combining the words “freedom” and “state”. So long as the state exists there is no freedom. When there is freedom, there will be no state.
Lenin, The State and the Revolution, 1917 https://www.marxists.org/archive/lenin/works/1917/staterev/c...