( لِيَمِيزَ اللَّهُ الْخَبِيثَ مِنَ الطَّيِّبِ ) ([This is] so that Allah may distinguish the wicked from the good): It means that there is a test, scrutiny, and purification of the element of faith. This is the nature of worldly life – the presence of night opposite day, falsehood opposite truth, and evil opposite good. This is the divine decree of Allah (swt). Therefore, the scrutiny and tests that believers face, such as the Battle of Badr, serve to distinguish the wicked from the virtuous. In this significant battle, a small and oppressed group of believers confronted a larger force with strength and wealth. These challenges aim to distinguish the impure from the pure in the divine plan.
( وَيَجْعَلَ الْخَبِيثَ بَعْضَهُ عَلَىٰ بَعْضٍ فَيَرْكُمَهُ جَمِيعًا فَيَجْعَلَهُ فِي جَهَنَّمَ ) (and place the wicked some of them upon others and heap them all together and put them into Hell): Wickedness has various shapes and multiple forms. Wickedness indicates elements of evil, so all these impurities are judged together. Allah (swt) gathers all of those who commit such impurities and places them in Hellfire.
( أُولَٰئِكَ هُمُ الْخَاسِرُونَ) (It is those who are the losers): They are described as losers because they lost the worldly life, the outcome, and the result of the test. Their loss was evident.