Recall that God promised you victory over a certain group, but you still wanted to face the weaker group. It was God’s plan to establish the truth with His words, and to defeat the disbelievers.
وَإِذ يَعِدُكُمُ اللَّهُ إِحدَى الطّائِفَتَينِ أَنَّها لَكُم وَتَوَدّونَ أَنَّ غَيرَ ذاتِ الشَّوكَةِ تَكونُ لَكُم وَيُريدُ اللَّهُ أَن يُحِقَّ الحَقَّ بِكَلِمٰتِهِ وَيَقطَعَ دابِرَ الكٰفِرينَ
wa iz ya’idukumul laahu ihdat taaa’ifataini annahaa lakum wa tawaddoona anna ghaira zaatish shawkati takoonu lakum wa yureedul laahu ai yuhiqqal haqqa bikalimaatihee wa yaqta’a daabiral kaafireen