At-Tawbah: 122
"And it is not for the believers..."
The lam (in li-yanafiru) is for the emphasis of negation. The meaning is that the mobilization of all people from their homelands to seek knowledge is neither correct nor possible. If it were correct and possible—and did not lead to corruption—it would be obligatory for everyone to seek religious understanding (tafaqquh), as seeking knowledge is a duty upon every Muslim man and woman.
"Why then did not a group from every division of them mobilize?"
Since the mobilization of everyone was neither possible nor beneficial, why did a small group from every large community not mobilize? They would suffice for the others in the mobilization:
"To gain understanding in the religion"
To take on the burden of attaining deep understanding and to endure the hardships of acquiring and mastering it.
"And to warn their people"
They should make the goal and the target of their ambition in seeking knowledge the warning of their people, guiding them, and offering them sincere counsel. This is contrary to the base objectives and trivial purposes pursued by many jurists today: seeking prominence, leadership, living in luxury, imitating oppressors in their clothing and mounts, competing with one another, and the spread of the "disease of co-wives" among them—where one’s eyes roll in envy if he sees a student of another, or a group sitting before him. They are obsessed with being the sole authority, and how far are such people from the words of the Almighty: "They do not desire exaltation upon the earth or corruption" (Al-Qasas: 83).
"So that they may beware"
The intent is that they may fear God and perform righteous deeds.
When the Messenger of God (ﷺ) would send out an expedition after the Battle of Tabuk—and after the stern verses regarding those who stayed behind were revealed—the believers would rush to mobilize to the last man. They would all be cut off from listening to the revelation and gaining religious understanding. Thus, they were commanded that a group from every division should mobilize for Jihad, while the others remain behind to study. This ensures they are not cut off from tafaqquh, which is the "Greater Jihad," for arguing with evidence has a greater impact than striking with the sword.
In this view, the pronoun in "to gain understanding" refers to the groups remaining behind, and "to warn their people" means the remaining groups warn the mobilized ones when they return, sharing the knowledge acquired during their absence. In the first interpretation, the pronoun refers to the group that mobilized to the city (Medina) to study.
"O you who have believed, fight those adjacent to you of the disbelievers and let them find in you harshness. And know that Allah is with the righteous."