Ideological hacks like Friedrich Hayek and his contemporary disciples pretend that the difference between capitalism and socialism is that the latter is planned and the former isn’t. It’s “the market” versus “centralized planning.” But this has nothing to do with it. For a very long time, capitalist societies have been largely planned, indeed since we entered the era of corporate capitalism in the early 1900s (if not before). Oligopolistic firms do all they can to limit competition or “the free market,” whether by means of trade associations, cartels, trusts, takeovers, informal agreements, or political lobbying. (See Robert A. Brady’s Business As a System of Power (1943).) As the state got more involved in the economy in the mid-twentieth century, more centralized planning became the order of the day. The Pentagon’s use of funds did much to determine the direction of the economy; such innovations as computers, satellites, numerical control of automated machines, containerization, electronics, lasers, the internet, and biotechnology were hatched in the state sector, relying on public funding. And of course corporations benefit from government policies in all kinds of ways: corporate welfare, for example, is vastly more fiscally significant than social welfare. In addition, central banks conduct very careful planning. Even a government’s turn to relatively laissez-faire policies has always had to be planned, as Karl Polanyi and David Harvey describe in The Great Transformation (1944) and A Brief History of Neoliberalism (2005) respectively. So there is nothing intrinsically “spontaneous” about capitalism. Far from it: the history of imperialism and colonialism shows that capitalism has always had to be politically imposed, through astonishing violence and brutality.
The true distinctions between capitalism and socialism lie in who benefits from the planning and how the planning is done. If it’s centralized and top-down, as in the former Soviet Union and the United States, it’s not socialist. If it’s intended to benefit an elite at the expense of wage-earners, it’s not socialist. Socialism is defined as workers’ control over their economic activity, and that control necessarily has to be grassroots-based (because that’s what popular control means). Naturally it will function so as to benefit the population, i.e., the people doing the work; one can expect that a true economic elite wouldn’t even exist. Such a society might very well incorporate markets, or, conceivably, it might not. This would be for the people to decide. The point is that markets have little to do with the capitalism/socialism divide.