Communism, as an idea, is pro worker. Yet for some reason, most communist countries seemed to have a sort of authoritarian rule.
This does delve a fair bit into political theory to explain this, but I'll try the best I can. I also think its important, if there is such a misconception, to separate "dictatorships" from "authoritarianism". The words sound similar and have a similar effect once hearing them, but they're entirely different ideas.
Many socialist countries do end up being authoritarian, but aren't exactly dictatorships. A dictator has sole power over the country and can't be legally contested. Think of a Dictator like Muammar Ghadaffi. The Soviet Union for example, couldn't have dissolved in the way it did if it were a dictatorship, at least at the time. The Soviet Union effectively dissolved itself via its legislative branch.
You are right that most socialist countries tend to have an authoritarian rule, but thats not the same as dictatorships. Stalin was a dictator due to his heavy usage of secret police and purges of political opponents, Gorbachev on the other hand was not.
It might be a better rephrasing to ask why Socialism/Communism leads to authoritarianism then, since dictatorships are highly complex and circumstantial can't be singularly attributed to what economic model a country follows.
The authoritarian nature of many socialist countries can be explain by the difference of socialism and communism. Communism can be explained as the end result or end goal of socialism. Think of Communism like Socialism 2.0. Communism is classless, moneyless, and most importantly, stateless. The road to achieve a Communist society however, is a very, very bumpy one. Throughout the 20th century, many nations have fought bloody civil wars and undergone significant civil conflict due to the proxy conflicts funded by the Capitalist United States and Socialist Soviet Union. This is due to the fundamental conflict in ideology between the economic models.
A Socialist country would need to have the workers owning the "means of production", that being factories, mines, farms, etc. However in order for that to happen, you need to acquire the means of production for the workers, and often times the people holding the means of production, capitalists, tend to not want to give up that power. Its a fundamental conflict between two economic models. One who favors worker owned industry against one that favors privately owned industry. Although there are ideologies such as Democratic Socialism which favor a peaceful reform into Socialism, the legislative/executive means for such reform are often times not viable for many Socialist nations.
This is why many Socialist countries seem to be authoritarian, since they need to heavily regulate their country to achieve a Socialist and then possibly Communist country. This is however, simply due to the heavy ideological conflict between the two economic systems. Remember, many nations during the Cold War were sponsored by both Capitalist and Socialist nations. And the regimes Capitalist nations supportive were no less Authoritarian than Socialist nations. It was due to the civil conflict and the requirement of the governments involved to have the power to fight and consolidate their rule, regardless of what economic system they supported.
South Korea and Chile both were US-backed regimes during the Cold War that turned into military dictatorships. But this was not an inherent cause of their economic model, but due to the conflict between the two systems of governance.
Socialist countries do tend to be authoritarian, but its important to understand that Socialism didn't become a wide-spread ideology until the 20th century, by which point both the Soviet Union and United States heavily agitated for civil conflict and supported nations with arms. Authoritarianism isn't a particularly uncommon trait in the type of situations many Socialist countries were in. When a regime is faced with strong ideological resistance, warfare, civil strife, and foreign pressure, they tend to be authoritarian to ward against such conflict. This is regardless of ideology.
Socialism isn't inherently authoritarian. There are a significant amount of Socialist supporters who favor no state control at all, instead wanting a system of worker unions, or worker owned companies, or communes to run the society. Socialism tends to be authoritarian due to the geopolitical climates they've been subjected to throughout history, as is the same for many capitalist nations alongside them.