First off they were installed in the government by force You could really only vote for one party. And usually the elections were to some degree rigged. And the government that did all the nice things you mention also committed genocides, mass starvation, massively oppressed its people, and finally spent so much on its military that they crashed the economy.
Not to say western democracy is perfect (the US is especially flawed these days), but there are a good amount of European countries that instituted many socialist policies democratically without that baggage.