﴾وَإِذِ﴿ “and when” referring to a time frame, meaning “and remember when…”
Allah always speaks to them on what causes corruption:
﴿لُعِنَ الَّذِينَ كَفَرُوا مِن بَنِي إِسْرَائِيلَ عَلَىٰ لِسَانِ دَاوُودَ وَعِيسَى ابْنِ مَرْيَمَ ۚ ذَٰلِكَ بِمَا عَصَوا وَّكَانُوا يَعْتَدُونَ (٧٨) كَانُوا لَا يَتَنَاهَوْنَ عَن مُّنكَرٍ فَعَلُوهُ ۚ لَبِئْسَ مَا كَانُوا يَفْعَلُونَ (٧٩)﴾
“Cursed were those who disbelieved among the Children of Israel by the tongue of Daud and of Isa, the son of Mariam. That was because they disobeyed and [habitually] transgressed. They used not to prevent one another from wrongdoing that they did. How wretched was that which they were doing.” [Surah Al-Ma’idah: 78-79]