Because some of the worst dictators of all time said they were communist and socialist, despite dictatorship being fundamentally antithetical to both.
Then a bunch of idiots watched a dictatorship, the USSR, burn up their economy with a space and arms race, so now they think socialism kills economic progress. It wasn't that the USSR didn't invest properly in the populace, or infrastructure, or that they were fundamentally a kleptocracy with a massive military, it's that they called themselves socialist. That's what killed them.