(كَدَأْبِ آلِ فِرْعَوْنَ) ([Theirs is] like the custom of the people of Pharaoh): When a person is described to accustomed upon something, it means that does it regularly.
(وَالَّذِينَ مِن قَبْلِهِمْ) (and of those before them.): Like the people of Thamud, Hud, the people of Lot, and the people of Noah.
(كَفَرُوا بِآيَاتِ اللَّهِ فَأَخَذَهُمُ اللَّهُ بِذُنُوبِهِمْ) (They disbelieved in the signs of Allah, so Allah seized them for their sins.): Allah, (swt) set the example with the people of Pharaoh because the Pharaonic civilization still exists, representing a living testament to the arrogance and tyranny of Pharaoh’s people.
وَقَالَ فِرْعَوْنُ يَا هَامَانُ ابْنِ لِي صَرْحًا لَّعَلِّي أَبْلُغُ الْأَسْبَابَ (36) أَسْبَابَ السَّمَاوَاتِ فَأَطَّلِعَ إِلَىٰ إِلَٰهِ مُوسَىٰ وَإِنِّي لَأَظُنُّهُ كَاذِبًا ۚ وَكَذَٰلِكَ زُيِّنَ لِفِرْعَوْنَ سُوءُ عَمَلِهِ وَصُدَّ عَنِ السَّبِيلِ ۚ وَمَا كَيْدُ فِرْعَوْنَ إِلَّا فِي تَبَابٍ
(And Pharaoh said, “O Haman, construct for me a tower that I might reach the ways (37) The ways into the heavens – so that I may look at the deity of Moses; but indeed, I think he is a liar.” And thus, was made attractive to Pharaoh the evil of his deed, and he was averted from the [right] way. And the plan of Pharaoh led to nothing except ruin) (Ghafir: 36-37)
Allah (swt) seized them due to their sins, for He is powerful and severe in punishment.