The Mitzvah of Serving in Tzahal

Our Rabbi, Ha-Rav Tzvi Yehudah Ha-Cohain Kook, explains that serving in Tzahal is a three-fold mitzvah:
1. Saving of Lives
The protection of the Nation of Israel in our Land is accomplished by the removal of the enemy’s army as much as possible. In order to protect the Nation, there is a need for self-sacrifice as we are commanded, "Do not stand idly while your brother’s blood is shed" (Vayikra 19:16): If you see a fellow drowning in a river or bandits are attacking him or a wild animal is attacking him, you are obligated to save him (Sanhedrin 73a). According to various authorities, even if there is potential danger for the one who comes to rescue, he is obligated to attempt to rescue one who is in a situation of certain danger (Hagahot Maimoniyot, Rambam - Hilchot Rotze’ach U-Shemirat Nefesh, chap. 1, Kesef Mishnah ibid., Beit Yosef Choshen Mishpat 426 in the name of the Yerushalmi). This is also implied from the literal meaning of the words of the halachic authorities, who write: "One who is drowning in a river, or bandits are attacking him, or a wild animal is attacking him," since clearly there is also potential danger in rescuing, and the authorities did not limit the obligation of rescuing only to a rare circumstance when there is no danger. This applies all the more so when we are not discussing the saving of individuals but the saving of the entire Nation of Israel. Self-sacrifice is what saves blood.

2. The Mitzvah of Settling the Land of Israel
We are commanded to dwell in the Land of Israel, to settle it and also to possess it, as the Ramban writes: "do not leave it in the hand of any other nation" (Positive mitzvah #4 in additions to Rambam’s Sefer Ha-Mitzvot). "This mitzvah applies in all of its borders and its boundaries...that we are not to leave a part of it" (ibid.). For this mitzvah, if there is a need, we are commanded to sacrifice our lives, and even to enter into war, which is necessarily a dangerous venture. We will not attain security and our peace by yielding, but on the contrary, by strength and "standing at full stature."

3. Sanctification of G-d’s Name
We are commanded to sanctify G-d’s Name: "And I will be sanctified amongst the Children of Israel" (Vayikra 22:32), and there are many levels and shades of this great mitzvah (see Yoma 86a and Rambam - Hilchot Yesodei Ha-Torah, chap. 5). There is sanctification of G-d’s Name by individuals and there is sanctification of G-d’s Name by the entire the Nation. We are commanded to be partners in the great act of Hashem, returning the Nation of Israel to its Land and its revival, and to perform anything which is in our power for the sake of this great sanctification of G-d’s Name (see Le-Netivot Yisrael of our Rabbi, Ha-Rav Tzvi Yehudah vol.1, pp. 118-127).