The free market is a fairy tale unicorn. Government is needed for a market to function at a national scale because without government regulation and infrastructure, you wouldn't be able to engage in commerce. Try having a market without an electric grid, roads, bridges, laws, courts, police, inspectors that make sure the restuarant doesn't have their food covered in cocroaches or the factory isn't dumping dangerous chemicals into the river..etc. You need government hence where is the self-regulating, functioning market that is solely dependent upon the so called invisible hand of supply and demand? That's a pink unicorn. Markets need governments.
What is the government? It can be nothing more than a social apparatus organized by the people to manage their large-scale socioeconomic civil affairs and projects. It's not inherently good, nor is it inherently evil, it's whatever we want it to be, especially in a democracy. Unlike private corporations, the government holds elections and we can have as much power and oversight over its functionaries and processes as we decide. Can we do that with a private company? Nope. People who claim to love liberty and freedom have no problem waking up in the morning and spending most of their waking hours in an absolute dictatorship, being told what to do. The workplace under capitalism is an absolute dictatorship. That's not the case in socialism.
In a socialist society, workers have more say on how the factory or production, in general, is organized and run. If you're a member of the communist party (which in a communist society, practically everyone over the age of 12 or 13 is eligible to join), you have a lot more say and power over the government and how society is run than we do here in capitalist-run America.
As technology advances, we're going to have to socialize and democratize production.
Do you want the billionaires, the ruling class in this country to own all of the technology? All of the patents and licenses, the facilities..etc? They own it and you and I will be reduced to compost because they don't need us to work for them anymore. What the socialists say is that we all will own the technology and the means of production. The facilities, the equipment, the machines, the self-driving vehicles, the robots, and the artificial intelligence. All of us own it together, collectively and we organize production to meet our needs, rather than for profit.