Over the near term, the world will need good people who know how to wage righteous defensive war. Maybe we can all be like Costa Rica with no military someday, but that's not how the world is now. Look at Venezuela making moves to conquer parts of Guyana right now! You have a duty to be available to fight a righteous defensive war, wherever you go in the world. And so will your children.
Israel knows how to win wars, but doesn't know how to win peace against a very evil ideology like Islamic extremism. (It's difficult.) But it doesn't help that Israel supports ultra-orthodox Jews who don't serve in the IDF military, and things would be worse if they did. Could Israel just withdraw to behind the West Bank wall, and leave West Bank Palestinians alone like Israel left Gaza alone 2005-2023?