Keynes, by no stretch of the imagination was a socialist, although the right-wing thinks so. (Another of the many areas they have been shown to be wrong.)
As
Keynes put it: in the absence of an effective monetary or fiscal policy, a recession would have to go on until "the shortage of capital through use, decay and obsolescence causes a sufficiently obvious scarcity to increase the marginal efficiency." However, the government could create demand and shorten the time of the slump.
The debate over business-cycle economics has always settled to a left-right divide. Specifically, the right has always been deeply hostile to the notion that expansionary fiscal policy can ever be helpful or austerity harmful; most of the time it has been hostile to expansionary monetary policy too (except for Friedman types). So the politicization of the macro debate isn't some happenstance, it has deep roots. After World War II there was a concerted, disgraceful effort by conservatives and business interests to
prevent the teaching of Keynesian economics in the universities.
It's also a topic that tends to cut at the grain of conservative ideology, namely, the government can never help, it's all the free market. So, any model that shows that the government can help (e.g. shorten an economic slump) undercuts the basic premise of conservative thought. This ties into the general fear on the part of conservatives that if you admit that the government can do something useful other than fighting wars, you open the door to the idea that other government activities might work. That explains why conservatives have always seen Keynesianism as a dangerous leftist doctrine even though that makes no sense in terms of the theory’s actual content. On top of that there’s the
Kalecki point that admitting that the government can create jobs undermines demands that policies be framed to cater to all-important business confidence. Keynesian economics, if true, would mean that governments don't have to be deeply concerned about business confidence, and don't have to respond to recessions by slashing social programs. Therefore it must not be true, and must be opposed.
The flip-side fact that Keynes also believed that in boom times, government spending should be cut and taxes raised, to cool down the economy, never gets the play from conservatives.