"That is because your Lord would not destroy the cities for wrongdoing while their people were unaware," meaning: Allah did not destroy any of the past nations until He had sent a messenger to them.
Muhammad said: And the meaning of "That is because your Lord would not destroy" is that it is because He did not.
﴿ذَلِكَ أَنْ لَمْ يَكُنْ رَبُّكَ مُهْلِكَ الْقُرَى بِظُلْمٍ وَأَهْلُهَا غَافِلُونَ﴾ يَقُولُ: لَمْ يُهْلِكِ اللَّهُ قَوْمًا مِنَ الْأُمَمِ السَّالِفَةِ؛ حَتَّى بَعَثَ إِلَيْهِمْ رَسُولًا.
قَالَ محمدٌ: وَمَعْنَى ﴿ذَلِك أَن لم يكن﴾ ذَلِك لِأَنَّهُ لم يكن.