Gandhi supported caste out of political self-interest

Evidence

The second source of confusion is the double role which the Mahatma wants to play—of a Mahatma and a politician. As a Mahatma, he may be trying to spiritualise politics. Whether he has succeeded in it or not, politics have certainly commercialised him. A politician must know that society cannot bear the whole truth, and that he must not speak the whole truth; if he is speaking the whole truth it is bad for his politics. The reason why the Mahatma is always supporting caste and varna is because he is afraid that if he opposed them he would lose his place in politics. Whatever may be the source of this confusion the Mahatma must be told that he is deceiving himself, and also deceiving the people, by preaching caste under the name of varna. — Ambedkar, B R, Annihilation of Caste_ The Annotated…, 1263