To begin, the premise of this question is somewhat descriptive of the left wing political movements of Western Europe and North America (maybe even Eastern Europe too), but is not true of the left globally.
With this in mind, the real question is not so much "why is the left supporting Muslims?", as "why are Muslims supporting the left?"
Muslim support was not something that left wing political coalitions in Western Europe or North American actively sought out (at least until very, very recently). It wasn't clear to most people until quite recently in these places, whether Muslim communities tended to favor left wing or right wing political coalitions at all, because the number of Muslims who could participate politically as citizens was quite small until quite recently.
Political coalitions have very little incentive to keep people who want to join them out of their coalition, if they don't demand much in terms of the coalition's policies. All other things being equal, the party with the biggest tent wins. So, they are designed to be receptive to anyone who does not openly oppose their objective or demand policy changes from their platform.
Muslims, in Western Europe and the United States and Canada, tend to be personally more right wing on a variety of social and economic issues that the conservative leaning political parties of those countries (although Muslims immigrants from many countries in Western Europe and North America tend to be more liberal politically than their countrymen who did not immigrate). So, they are not natural candidates to join a left wing coalition (although this has changed over time as Muslims in these areas have joined left wing coalitions and seen their views on some issues, at least, shift to the left over time).
But, in Western Europe and the United States and Canada, the leading right wing political parties tend to more or less explicitly identify themselves with Christianity (in Western Europe they are often called "Christian Democratic" parties, and with their North American counterparts aren't quite as explicit, the Republicans and the Canadian Tories have a very Christian worldview), tend to be anti-immigration (which most Muslims are, or were a generation or two ago, in all of those places), and tend to be indifferent to official misconduct towards minority populations including Muslims.
In contrast, The left wing coalition in all of these places is not wrapped up in a specifically Christian identity, is more welcoming to immigrants, and cares about stopping official misconduct towards minority populations including Muslims.
Notably, these left wing coalitions didn't really have to change anything to have those more attractive policies for Muslims. Their more secular self-conception, their less xenophobic outlook, and their concerns about official misconduct towards minorities pre-dated significant Muslim immigration and was not motivated by Muslim concerns in the first place.
Faced with an existential threat (i.e. a threat to their very existence of people in the society) from the right and overt symbolic and interpersonal expressions from members of right wing political parties that Muslims are not welcome, in a world with only a finite number of available political parties (even in countries that don't have a two party system), Muslims are going to tend to choose to join the left wing coalition rather than the right wing coalition. They do so even thought there are other, less existentially important issues upon which a left wing coalition may not be in line with their personal views or preferences.
As Muslims have come to become more than an insignificant share of the left wing coalition in many parts of Western Europe and North America, despite the left wing not many any real policy concessions to attract them, members of left wing parties have come to have more interpersonal contact with Muslims which has led to reduced fear and increased mutual understanding, and political leaders in left wing parties have felt it politic and appropriate to refrain from emphasizing policies and issues that actively antagonize a not insignificant share of their coalition even when (if push came to shove) they might be uneasy with some of the political and social views of this part of their coalition.
Also, the biggest liberal concerns about Islamist practices and abuses involve matters that can only be implemented with majority control of the government (e.g. excessive use of corporal punishment in the criminal justice system), but which are much less harmful to non-Muslims, at least, when Muslims can only enforce their ideologies on co-religionists and can only do so via institutions of civil society rather than institutions of coercive government control.
So long as majority Islamic control of the government to enforce Islamic law policies on non-Muslims is for all practical purposes impossible, these concerns are not very threatening to left wing political coalitions.
In contrast, left wing coalitions in Western Europe and North America are concerned about theocratic Christian tendencies because Christians could viably gain control of the government if they were politically successful, at least in many large regions of countries in Western Europe and North America. So, their theoretic policy aspirations which could be imposed on left wing coalition members are a much more concerning threat to the left than Muslims for whom control of the government is not a viable possibility in these places.
Like Muslims who must prioritize their concerns in politics, left wing political leaders must also prioritize their concerns based upon which concerns are the most viable threats to the left wing political agenda.