6:131
ذَٰلِكَ أَن لَّمْ يَكُن رَّبُّكَ مُهْلِكَ ٱلْقُرَىٰ بِظُلْمٍ وَأَهْلُهَا غَـٰفِلُونَ
dhālika an lam yakun rabbuka muh'lika l-qurā biẓul'min wa-ahluhā ghāfilūna
your Lord would not destroy towns for their wrongdoing if they had not been warned.
This is because your Lord would not destroy the (populations of) towns for their wrong-doing (i.e. associating others in worship along with Allâh) while their people were unaware (so the Messengers were sent).