وَإِن مِّن قَرْيَةٍ إِلَّا نَحْنُ مُهْلِكُوهَا قَبْلَ يَوْمِ الْقِيَامَةِ أَوْ مُعَذِّبُوهَا عَذَابًا شَدِيدًا ۚ كَانَ ذَٰلِكَ فِي الْكِتَابِ مَسْطُورًا (58)
(17:58) There is no habitation which We shall not destroy before the Day of Resurrection or punish with a severe chastisement. *66 This has been ordained in the Eternal Record.
*66)
This is to remove the delusion of the disbelievers that their habitations were immune from danger or chastisement. This verse warns that every habitation will be destroyed as a matter of course or by Allah's chastisement.