The Torah dedicates more than twenty pesukim to describing the distribution of the booty taken from Midyan. It goes on to list the number of sheep and cattle, relating the manner in which they were divided. Why is this entire activity eternalized in the Torah for posterity? Is there a special message to be gleaned from here?
Horav Elchanan Sorotzkin z.l. explains that the Torah seeks to emphasize the importance of each member of the Jewish army, therefore it stresses those individuals who actually engage the enemy in battle, as well as those who stay behind. The latter contribute their share of the effort through tefillos, Torah study, and moral support. One should not think that the members of Shevet Levi, who have been singled out to “keep the charge of the Mishkan Hashem,” are less important participants in this war than the actual soldiers who bore arms and fought.
Chazal poignantly express this idea in the pasuk “Our feet were standing in your gate, Yerushalayim” (Tehillim 122). What caused our feet to remain strong and erect in time of war? What gave us the courage and fortitude to fight? “Your gates” refers to the gates of the batei midrash, where our holy Torah was being studied diligently. These gates provided the merit for our success in battle.