Surah At-Tawbah 9:122
۞ وَمَا كَانَ ٱلْمُؤْمِنُونَ لِيَنفِرُوا۟ كَآفَّةً ۚ فَلَوْلَا نَفَرَ مِن كُلِّ فِرْقَةٍ مِّنْهُمْ طَآئِفَةٌ لِّيَتَفَقَّهُوا۟ فِى ٱلدِّينِ وَلِيُنذِرُوا۟ قَوْمَهُمْ إِذَا رَجَعُوٓا۟ إِلَيْهِمْ لَعَلَّهُمْ يَحْذَرُونَ
And it is not for the believers to go forth [to battle] all at once. For there should separate from every division of them a group [remaining] to obtain understanding in the religion and warn [i.e., advise] their people when they return to them that they might be cautious.
Translation: Saheeh International
Tafsir
When the Prophet s was about to dispatch a raiding party — after they certain Muslims had been reproached for staying behind — all of them went forth and so the following was revealed It is not for the believers to go forth on a raid altogether why should not a party a group of every section of every tribe of them go …
Excerpt from Tafsir al-Jalalayn, commentary on 9:122, via Quran.com. The reader has the full commentary and 9 more tafsirs.