ذَٰلِكَ أَن لَّمْ يَكُن رَّبُّكَ مُهْلِكَ ٱلْقُرَىٰ بِظُلْمٍۢ وَأَهْلُهَا غَٰفِلُونَ
That is because your Lord would not destroy the cities for wrongdoing while their people were unaware.
That sending of the messengers is because an phonetically lightened with the lām of li-annahu implied thus read as li-annahu ‘because’ your Lord would never destroy the towns through injustice on their part while their inhabitants were heedless not having had any Messenger to make things clear to them.