لِیَمِیْزَ
اللّٰهُ
الْخَبِیْثَ
مِنَ
الطَّیِّبِ
وَیَجْعَلَ
الْخَبِیْثَ
بَعْضَهٗ
عَلٰی
بَعْضٍ
فَیَرْكُمَهٗ
جَمِیْعًا
فَیَجْعَلَهٗ
فِیْ
جَهَنَّمَ ؕ
اُولٰٓىِٕكَ
هُمُ
الْخٰسِرُوْنَ
۟۠
3

Verse 37 describes some consequences of the events mentioned earlier which, in a nutshell, are that the disbelievers used their wealth against Islam, then they were bitten by remorse and were utterly disgraced. This series of happenings had its own advantages which find mention in the opening sentence of this verse: لِيَمِيزَ اللَّـهُ الْخَبِيثَ مِنَ الطَّيِّبِ (so that Allah separates the impure from the pure).

The two words, الْخَبِيثَ (al-khabith: impure) and الطَّيِّبِ (at-tayyib : pure), stand in contrast to each other. The word, الْخَبِيثَ al-khabith, is used to refer to that which is impure, filthy and forbidden while الطَّيِّبِ at-taiyyib set against it denotes what is pure, clean, nice and lawful. At this place, the use of these two words may be referring to the impure possessions of the dis-believers, and the pure possessions of Muslim as well. Given this projection, it would mean that the enormous wealth spent by the disbelievers was impure and filthy. The evil end it met was that they suffered the loss of wealth, and the loss of lives as well. As compared to them, Muslims spent very little of whatever they had in the name of wealth, but that wealth was pure and lawful. Those who spent it succeeded, not to mention the additional spoils of war that fell into their hand. After that, it was said:

وَيَجْعَلَ الْخَبِيثَ بَعْضَهُ عَلَىٰ بَعْضٍ فَيَرْ‌كُمَهُ جَمِيعًا فَيَجْعَلَهُ فِي جَهَنَّمَ ۚ أُولَـٰئِكَ هُمُ الْخَاسِرُ‌ونَ ﴿37﴾

'and (Allah) puts some of the impure on some others, and heaps them all together and puts them into Jahannam. Those are the losers - 37'

The sense is that the way magnet pulls iron and amber pulls grass and in the light of new scientific discoveries, the system of the world is held together by the constant of force fields pulling things together, the case in deeds and morals is also identical. They have a pull of their own. One bad deed draws in another bad deed and a good deed draws in another good deed. Impure wealth pulls in another body of impure wealth and then this heap of impure wealth generates vestiges which are equally impure. As a result of this, Allah Ta` ala will heap all impure wealth into Jahannam and those to whom it belonged would find themselves in a terrible loss.

And there is a large number of commentators who take الْخَبِيثَ al-khabith and الطَّيِّبِ at-tayyib in the general sense at this place, that is, pure and impure. Thus, pure would signify true believers and impure would mean the disbelievers. Given this approach, the verse would mean that through conditions mentioned above, Allah Ta` ala likes to make the pure distinct from the impure, that is, make a true believer distinct from a disbeliever and - as a consequence of which - true believers are gathered together in Jannah and the disbelievers, all of them at one place, into Jahannam.