سُبْحَانَ ٱللَّٰهِ
Holy Qur'an
Al-Qur'an
Kids Qur'an
I.e., firstly, because this belated faith could not unmake a reality which had already come into being, and, secondly, because it could not contribute to their spiritual growth inasmuch as it was not an outcome of free choice but had been, rather, forced on them by the shock of an irreversible calamity.
The "way of God" (sunnat Allah) is the Qur'anic term for the totality of natural laws instituted by the Creator: in this case, the law that faith has no spiritual value unless it arises out of a genuine, inner enlightenment.
Again and again were they given chances, and again and again did they reject them. When it was too late, and in fact when it had no meaning, they offered to profess Faith. That was of no use. Allah does not accept unmeaning things of that kind. He wants to train and purify our will. For their disobedience and rebellion they perished utterly.