Nationalizing all of the means of production is not inherently socialism, even if it was done with the intent of bringing about socialism.
Capitalism, in the most broad sense, is private ownership over the means of production. This does not imply that every person has the right or the ability to own a farm, factory, store, company, etc.
It could indeed be made so that only a select few people are legally allowed control over the means of production, and it'd still be just as capitalist as ever.
Therefore, there is nothing intrinsically anti-authoritarian about capitalism.
In fact, not everything that the state does is necessarily "public", and certainly not everything the state does is worker-controlled. Even if it is tax-funded, the government can /privately/ own the means of production /exclusively/, meaning the government essentially becomes a tax-funded corporation that has monopolized the market. That is still most definitely capitalism.
This is called state capitalism, which is a term coined by Vladimir Lenin to describe the stage of development the USSR was in. All things considered, the USSR fits the description quite well. Lenin believed state capitalism was necessary to build infrastructure before switching over to a true socialist economy.
However, they never moved past that stage, and instead became what Trotsky referred to as a deformed workers state, meaning the industries were mostly nationalized to benefit the workers, but the workers never actually had control over the means of production. Trotsky became disillusioned with where the revolution was heading, finding the USSR to be undemocratic and bureaucratic. He was Stalin's greatest threat, and his greatest enemy.
Stalin's rise to power could in fact be compared to a hostile takeover of a corporation, and the nature of the Communist Party was quite similar to how private businesses are usually run.
Now, what happened was that Stalin got into power, looked at the system they had going on and said "This is socialism". Because of the failed Marxist-Leninist strategy that became the norm with every major communist revolution, and because of both Lenin and Stalin's influence of so many revolutionaries, these countries all repeated the same mistakes, and created bureaucratic, authoritarian deformed workers states and claimed that they had achieved socialism.
This is the reason people think that the disasters of these so-called socialist countries is representative of every ideology within the broad category of socialism, and why they're under the impression socialism cannot work and has been tried and failed.