In honor of Yom Hazikaron, which falls out today but is being observed on Monday, a teshuva from the author of דיני צבא ומלחמה, a major halachic work for Israeli soldiers.
Rav Min HaHar was asked if one can volunteer for a military operation that is potentially life-threatening, if the option is to allow others to volunteer while the observant soldier stays behind and engages in Torah learning. The questioner also worried that perhaps failure to volunteer would result in a חילול השם. Finally, he asked whether or not the extra experience should be a factor?
Rav Min HaHar responded that there is ample evidence from Tanach of individuals volunteering for military service (soldiers fighting with Devora and Barak, Yonatan ben Shaul, and others), and many of these individuals clearly could have been staying behind and learning instead. However, Rav Min HaHar does not think that potential חילול השם should be a factor in the decision.
In terms of considering the fact that being involved in this mission will give the soldier more experience, which will be valuable in the future, Rav Min HaHar does not consider that sufficient reason to volunteer for a mission that would involved חילול שבת (since we do not allow medical students should work on cadavers on Shabbat based on similar logic), however it may be reason enough to allow someone to volunteer for a potentially dangerous mission.