Amatul Rahmân Omer:
(The Lord did it) so that He may let the truthful give expression to their truthfulness (-whether they were true to their covenant). And (whereas He will reward the true believers); He has in store a woeful punishment for the disbelievers.