“That God may purify those who believe,” meaning: He tests them, according to the interpretation of Mujahid. “And destroy the disbelievers,” meaning: He will destroy their deeds on the Day of Resurrection.
Muhammad said: It is also said that the meaning of “That God may purify” is: He purifies their sins. The root meaning of purification (at-tamhis) is: cleansing and purging.
﴿وليمحص الله الَّذين آمنُوا﴾ أَي: يختبرهم؛ فِي تَفْسِير مُجَاهِد ﴿ويمحق الْكَافرين﴾ أَي: يمحق أَعْمَالهم يَوْم الْقِيَامَة.
قَالَ مُحَمَّد: وَقيل: معنى ﴿وَلِيُمَحِّصَ الله﴾ أَي: يمحص ذنوبهم؛ والتمحيص أَصله: التنقية، والتخليص.