Because it has to look like socialism failed completely on its own, because of policy, or else it will create some sort of backlash. If socialism is seen to fail without public meddling from his admin then they can say, "well that's socialism, it always fails," the implication being on its own.
It also makes Mamdani look bad to certain crank liberals and certain crank radical leftists if Trump is seen approving of Mamdani. As a member of DSA I can't overstate the effect of his win, we went from 80k to 85k members in one day.
Making socialism look bad to all those people in the middle to whose opinion of socialism and social democratic policies is starting to trend much more positive, has always been a top priority for the ruling capitalist class. If you're seen fighting something that people think is good and practical, you look like a villain, which angers people into wanting to act.
Unfortunately a lot of those people in the middle are under the influence of illusions about capitalism. Maintaining those illusions is a multi-trillion dollar industry. Even when middle class people have positive opinions, they aren't doing practical organizing. Basically they are more split on these issues than a lot of polling suggests. Keeping those people in a state where they will believe that the status quo is still better for them than the struggle for democratic socialism and liberation, is the ur-policy of the ruling class, and has been since FDR.