One of convenience primarily rather than any ideological affinity, apart from political points gained.
The Communists routinely support Muslim demands and the Indian Muslims rarely if ever, rail against the Communists.