8.25 And guard against tumult or oppression, which affects not in particular (only) those
of you who do wrong: and know that God is strict in punishment.
This refers to those widespread social evils whose harmful effects are not confined to the ones engaged in these sins. If filth or trash, for example, is found only at a few places in a locality, it will possibly affect only those who have not kept themselves or their houses clean. However, if it becomes widespread and no one is concerned with removing uncleanliness and maintaining sanitary conditions, then everything including water and soil will become contaminated. As a result, if epidemics break out, they will not only afflict those who were responsible for spreading filth and themselves lived in unsanitary conditions, but virtually all the residents of that locality. of you who do wrong: and know that God is strict in punishment.
What is true of unsanitary conditions in a physical sense, also holds true for filth and uncleanliness in a moral sense. If immoral practices remain confined to a few people here and there but the overall moral concern of the society prevents those practices from becoming widespread and public, their harmful effects remain limited. But when the collective conscience of the society is weakened to a point whereby immoral practices are not suppressed, when people indulge in evils without any sense of shame and even go around vaunting their immoral deeds, when good people adopt a passive attitude and are content with being righteous merely in their own lives and are unconcerned with or silent about collective evils, then the entire society invites its doom. Such a society then becomes the victim of a scourge that does not distinguish between the grain and the chaff.
What God's directive seeks to impress upon people is that the reformatory mission of the Prophet (peace be on him) and the cause he was inviting people to was the source of life and well-being for them both individually and collectively. People should bear in mind that if they fail to participate wholeheartedly in the task to which they were invited and remain silent spectators to rampant evils, that would invite a scourge that would embrace all. It would afflict even those individuals who neither themselves committed evils nor were instrumental in spreading them and who might in fact have been righteous in their personal conduct. (Tafheemul Quran)