Why were there not, among the generations before you, persons possessed of balanced good sense, prohibiting (men) from mischief in the earth – except a few among them whom We saved (from harm)? But the wrong-doers pursued the enjoyment of the good things of life which were given them, and persisted in sin.
Ibn Kathir writes,
There must be a Group of People Who forbid Lewdness
If only there had been among the generations before you
persons having wisdom, prohibiting (others) from Fasad
(corruption) in the earth, except a few of those whom
We saved from among them!
Allah, the Exalted, says that there should have been a group of wise people present among the past generations who called to good and forbade the evil and corruption that took place among them in the land.
His statement, ًَ(except a few),
This means that there were only a small number of people present among them who were of this caliber. They were those whom Allah saved at the sudden striking of His vengeance, when His anger was let lose. For this reason Allah commanded this noble Ummah (followers of Muhammad) to always have among them those who command the good and forbid the evil.
This is as Allah says,
Let there arise out of you a group of
people inviting to all that is good,
enjoining righteousness and forbidding
evil. And it is they who are the successful.
It is related in a Hadith that the Prophet said,
Verily, whenever a group of people see an evil
and they do not change it, it is likely that Allah
will cover them with (His) punishment.
Thus, Allah says,
If only there had been among the
generations before you persons having
wisdom, prohibiting (others) from the
Fasad in the earth, – except a few of
those whom We saved from among them!
Concerning the statement,
Those who did wrong pursued the enjoyment of good
things of (this worldly) life,
This means that they continued in their ways of
disobedience and evils and they did not heed the
protesting of those righteous people, until the
torment suddenly seized them.
and were criminals.
And your Lord would never destroy the towns wrongfully,
while their people were doers of good.
Allah informs that he does not destroy any town,
except that it has wronged itself. No correctional
punishment or torment comes to any town,
except that its people were wrongdoers. This is as
We wronged them not, but they wronged
Allah also says,
And your Lord is not at all unjust to (His)
Kathir, Ibn. Tafsir Ibn Kathir. (Surah 11 verse 116). https://ia803208.us.archive.org/22/items/TafseerIbnKathirenglish114SurahsComplete/002BaqarahI.pdf