(Al-Anfal) 8 : 37
لِيَمِيزَ اللَّهُ الْخَبِيثَ مِنَ الطَّيِّبِ وَيَجْعَلَ الْخَبِيثَ بَعْضَهُ عَلَىٰ بَعْضٍ فَيَرْكُمَهُ جَمِيعًا فَيَجْعَلَهُ فِي جَهَنَّمَ ۚ أُولَٰئِكَ هُمُ الْخَاسِرُونَ
So that, Lord Allah may separate the impure from the pure, put the impure one another, heap them together and cast them into Hell, those are the only losers.
Everything happening in the universe is already decided by the Lord and is inscribed in His Book—Adhikr—as explained in verse 6: 59. But the aimless hypocrites and their heedless followers by rejecting Adhikr are serving Satan as explained in verses 2: 168-169; 6: 55 and 7: 40. They are not considering that all their feelings and deeds are being recorded in the software fastened around their neck as explained in verses 17: 13-14. See explanation 3: 177-180 and 185.