It is not socialism that explains capitalism, argues Max Weber, it is rather capitalism that explains socialism. And as long as capitalism exists, socialist aspirations will persist:
“What characterises our current situation is firstly the fact that the private sector of the economy in conjunction with private bureaucratic organisation and hence with the separation of the worker from the means of operation (Betriebsmitteln), dominates an area that has never exhibited these two characteristics together on such a scale at any time in history, namely the area of industrial production. Secondly there is the fact that this process coincides with the introduction of mechanical production within the factory, and thus with a local concentration of labour on one and the same premises, with the fact that the worker is tied to the machine, and with common working discipline throughout the machine-shop or pit. Above all else, it is this discipline which gives our present-day way of ‘separating’ the worker from the means of work (Arbeitsmitteln) its special quality.
It was life lived under these conditions, this factory discipline, that gave birth to modern socialism. Socialism of the most diverse kinds has existed everywhere at every period and in every country in the world. The unique character of modem socialism could grow only on this soil. (p. 283)
For it is my opinion that there is no way to eliminate socialist convictions and socialist hopes. Every working class will always return to socialism in some sense or other. The only question is whether this socialism is one that can be tolerated from the point of view of the interests of the state.” (p. 302)
Weber, Max. 1994. “Socialism”. Pp. 272-303 in Weber: Political Writings, edited by Peter Lassman and Ronald Speirs. Cambridge University Press.