When a bunch of apparently smart people (and economics requires if not actual intelligence then a considerable degree of cleverness) do something monumentally stupid, you have to think that Hanlon's Razor might not be a sufficient explanation. It might be the case that economists really are that stupid, but economics is sophisticated enough that "Clarke's" corollary — any sufficiently advanced stupidity is indistinguishable from malice — comes into play.
There is another possibility than outright malice: a hidden agenda. It might be the case that economists (and the capitalist ruling class) are not really interested in the stated agenda, but have a different agenda. It's not that they are strictly malicious, it's not that their intention is to inflict pain, suffering and deprivation, it's just that they are indifferent to deprivation, or that deprivation is an "unfortunate" consequence of their primary agenda. (In much the same sense, a "sophisticated" theodicy might hold that there isn't a specifically malicious God, it might be the case that God is simply indifferent to human suffering, or human suffering is a consequence of His real plan, a plan that does't have anything to do with the well-being of those presently alive.)
So what might be the agenda of the capitalist ruling class and their captive economists? The key issue, I think, is a certain faction of the capitalist ruling class that has been unrelentingly hostile to Social Security. A bit of initial resistance can be explained by short-sightedness or "ordinary" stupidity, but the depth of their commitment to destroying Social Security and Medicare compels a deeper explanation. It would be too facile, however, to just say that this faction just hates old people and wants them to starve. We are forced, I think, to conclude that this faction does not want to admit any compromise to their power to act arbitrarily; they do not admit any positive, active responsibility to the working and professional classes. They know, rightly I think, that to compromise their power even a little will be the thin end of the wedge to the complete destruction of their privilege and power. Even a little "socialism" will, if left unchecked, eventually resolve to outright communism, and the complete social ownership of capital.
(In a somewhat related sense, the most compelling revolutionary objection to reformism is that the "reformists" seem always to want to sacrifice the ability to pursue additional reforms. As Elena Kagan documents, the "reformers" in the early 20th century conflicts in the New York garment district sacrificed the right to strike for improvements in working conditions. I'm not averse to compromise and a degree of flexibility, but it's outright treason to give up your guns to win a single battle. Kagan also documents the revolutionaries' inflexibility and their unrealistic notion that they could win a revolution with one decisive battle.)
We have given the professional-managerial middle class their chance. They gave it their best shot from 1930 to 2010 (and we learned a lot), but they have ultimately failed. They're now fighting a rear-guard action, a Dunkirk if you will, to try to rescue as much as possible from the onslaught of the Randians. But the
They really do want to "purge the rottenness from the system", the "rottenness" that consists of you and me expecting that we have any right to dignity, respect, opportunity, comfort or a "good" life. We can have those things, but not as a matter of right, only as a matter of power. And we will receive dignity only when we take that power and pry our rights from the hands of the Randians. And if the Randians will surrender our rights only over their dead bodies, well, that's their choice, not ours.