Some things work better privatized, some don’t, and some are in a gray area.
Leaving aside the “business can just make more money by jacking rates up!” partisan silliness, there is a legitimate economic case to be made for the government doing some things and not others, and historically what the government chose to do was based not on anything logical or founded in good economic practice, but in political stupidity.
Generally speaking, the government is best involved in areas where there is a market failure (that is an actual term of art) which means that there are some areas where the market actually does not work and cannot provide an economy with the things it needs in an efficient manner. I should say here that while a “market failure” technically exists whenever a market is not Pareto efficient, it’s not like you always have a perfect idea of what’s close to Pareto efficient and what isn’t, so there are some arguable cases. However, an obvious example here would be, say, the military. A country isn’t going to have a functioning national defense capability unless it’s funded by the government. It doesn’t make sense for me to go out and buy a tank for the Army, even though we can assume it makes sense for all taxpayers to collectively buy that tank for our mutual protection. So you have to “socialize” that. My country (Canada) needs new missile destroyers, so the government is currently starting a multi-billion dollar program to replace its existing fleet with shiny new ships. If that wasn’t a “socialized” process it just wouldn’t happen; the free market would provide Canadians with no destroyers at all. Who would buy one?
Another example of market failure is, just to jump on a hot button issue, universal health insurance. For a variety of reasons but you can look up the main one by googling “adverse selection,” health insurance works better the more people who are in the pool, and so national health insurance is quite effective, where a purely free market is wasteful and inefficient. That doesn’t mean that the government has to be in the business of health CARE, mind you, which is actually quite well delivered by a free market. Health INSURANCE, however, is best done by government.
On the other hand, there’s no really good reason why the government should, say, be selling you your gasoline, but that’s what we had in Canada for many years; a government-owned gas company, Petro Canada, which (surprise!) did not provide Canadians with gas any better or any more cheaply than Esso or Shell or what have you.