First let's make sure of what we're talking about. Some folks have been freely applying the socialist label to anything they consider good, but the word does have a long-standing definition: state control of the means of production. Means of production is an economic term for creating value. Factories, stores, doctors all create value. "Control" doesn't mean state ownership, even if that's the most famous example. The Soviets would shoot the factory owner and install a commissar as the new manager. The Nazis would have the local Gauleiter drop by and suggest the owner focus on making cheap cars or cheap radios according to the Fuerher's latest whim (lest brownshirts drag the owner out into the street and kick him to death). Chunks of the American economy are partially socialized by having government regulations tightly restrict what people can do to where they can't make decisions about their own business.
If something isn't producing new value, it's not part of the "means of production" and isn't socialist even if it's a government program. Police catching criminals isn't socialism. Social security and pensions aren't socialism. Safety rules aren't socialism (but they can be stretched into controlling mechanisms, so there's a broad grey area).
Problem One: Top Down
A socialist program is run with a central plan assigning roles to all the work units in the country. This has the basic problem of all centralized structures: it's hard for them to get the information they need. No one can track the work time of everyone in a single industry, so all information has to be summarized on its way to the center. That gives you the SNAFU Principle: the summary will be shaded to avoid pissing off higher-ups. Do that in a tall chain of command and you get this example.
This overly-processed data is then used to create a Plan, which is passed down the chain and applied to the whole country. As usually happens with "one size fits all" there will be places where the Plan makes things worse or doesn't work at all. Gaining an exception from the Plan is possible but depends on how much pull local leaders have the central planners. So the exceptions will be distributed to those with political power, not those who need them the most.
Between the bad data going in and the poor fit of the Plan to reality the outcome of the Plan will fall short of expectations. The central planners will do their best to conceal that to save their jobs, or dictatorial polities, lives. They might falsify reports or blame their opposition. In the Ukrainian famine the Soviet planners kept exporting grain to meet their goals, leaving the farmers starved to the point of cannibalism.
Such an atrocity isn't an accident--it's the inevitable consequence of moving decision-making far away from where the actual work is taking place. Medicare mischarging, defense contract overruns, failed Soviet Five Year Plans, and the millions dead in China's Great Leap Forward are all results of the same problem.
Problem Two: Bottom Up
For most people in a socialist system, the grand Plan is of no concern. They're trying to get through one day at a time without being punished. They do the work that they're given incentives to do. Unfortunately the incentives often don't match real value production, and may even be counter to what planners wanted. Viktor Suvorov lived that in the Soviet Union. A factory made extra fertilizer, but the collective farms didn't have enough trucks to transport it, so the excess was dumped into the Dnieper River, killing fish. The factory manager responded to his incentives, the drivers for the farms to theirs.
Of course, the incentive problem isn't limited to socialism. Plenty of big corporations give employees bad incentives, and small business owners may prioritize their personal convience over customer service. Consumers treated badly have to put up with it or search for alternative providers. In the extreme case, they may start a business of their own to compete with the one that treated them badly. And they're allowed to do that in a free market.
Under socialism people are stuck with the providers that they're assigned to. It's like only being able to see the doctor covered by your health insurance--except it applies to your groceries, and clothes, and appliances, and everything. Since the providing organizations don't have to worry about their customers going elsewhere they have no incentive to improve service. Workers don't need to put out extra effort. Managers can arrange things according to their whims instead of focusing on the bottom line.
There are incentives workers respond to--not being punished by their bosses. This leads to the famous Potemkin Village, where the bigwigs see a show put on for their benefit with no connection to reality. This is the SNAFU principle from above seen from the other point of view.
With the workers practicing "we pretend to work and they pretend to pay us" the system becomes steadily more inefficient even if the top-level Plan is good. Contradictions in the plan force the worker bees to cheat. Every socialist system has its black market, as people try to make the exchanges needed to keep things from falling apart. But that can add to the inefficiency of other areas even as it fixes one problem.
Problem Three: Parasitism
All this inefficiency means socialist systems are consuming value, not producing it. But this can be lived with if there's non-socialist sectors producing enough wealth to sustain the whole economy. The US school system doesn't charge students for their education. It's paid for by taxes on everyone else. In the medical sector charity hospital and Medicare/Medicaid are supported by taxes as well. We can afford that.
The problem comes when more and more of the economy is socialized. You wind up with the inefficiency being paid for by running down the accumulated wealth of the country. Old buildings are used with minimal maintenance, tools break and less-efficient ones replace them, resources run out. As the Margaret Thatcher quote goes, "Eventually you run out of other people's money."
So the Soviet Union collapsed. Britain's socialized industries were privatized again. Venezuela is undergoing collapse now, as falling oil prices have wiped out the subsidies of food imports. Even the Nordic countries pointed to as examples of "democratic socialism" have been loosening their restrictions on free enterprise. An economy needs to produce wealth, not just redistribute it, and socialism is bad at that.
Given the track record of failure worldwide, why are people advocating socialism? My guess is that it feels more comfortable with our hunter-gatherer evolved minds. In a band of a few score people someone having noticeably more food probably cheated or was very lucky. The modern 1% produce an emotional reaction in those who think their share of wealth is unfair.
Is it unfair? Probably. But lots of things are unfair, and fixing them can be worse than living with them. A society of millions of people can't run the same way as a band of a hundred hunter-gatherers. We need to give everyone the flexibility to deal with their local circumstances and make their own decisions. That's what brought us to the information age. Countries that take that freedom away have gone backwards. Producing new wealth is what lets us be in a position to clean up pollution and take care of the needy.
Because even hunter-gatherers are smart enough to not work harder if someone else is going to take most of what they produce.