Allah affirms His perfect justice and fairness in His decisions, for He decided that He will not change a bounty that He has granted someone, except on account of an evil that they committed. Allah said in another Ayah,

إِنَّ اللَّهَ لاَ يُغَيِّرُ مَا بِقَوْمٍ حَتَّى يُغَيِّرُواْ مَا بِأَنفُسِهِمْ وَإِذَآ أَرَادَ اللَّهُ بِقَوْمٍ سُوءًا فَلاَ مَرَدَّ لَهُ وَمَا لَهُمْ مِّن دُونِهِ مِن وَالٍ

(Verily, Allah will not change the (good) condition of a people as long as they do not change their state (of goodness) themselves. But when Allah wills a people's punishment, there can be no turning it back, and they will find besides Him no protector.) 13:11

Allah said next,

كَدَأْبِ ءَالِ فِرْعَوْنَ

(Similar to the behavior of the people of Fir`awn,) meaning, He punished Fir`awn and his kind, those who denied His Ayat. Allah destroyed them because of their sins, and took away the favors that He granted them, such as gardens, springs, plants, treasures and pleasant dwellings, as well as all of the delights that they enjoyed. Allah did not wrong them, but it is they who wronged themselves.