We in Israel are at war with the Arabs.
We are also at war with each other. We are actually at many wars with each other. That is the way of Jews...
One of the wars is the religious war revolving around צה"ל - the IDF. The leaders of צה"ל are secular. Many of the soldiers are not. This, of course, leads to many conflicts. It is similar to a man and a women who marry, where one is a devout Jew, dedicated to observing every detail of the halacha while the other is apathetic or even hostile towards religious practice. There are going to be countless areas of conflict. If it is a couple who really loves each other then maybe-maybe-maybe they have a chance because of the eternal power of love. There is also the option of therapy that can help them iron out their differences.
But the romantic love between a man and a woman is much stronger than the feelings that soldiers have towards their commanders and officers. So a religoius boy goes to the army and they tell him that he must [for example] remain present when immodestly dressed women sing and perform - that is a problem GADOL!!! What are they to do??
You can't have an army where soldiers defy commands. That is the end of the army. You also can't go against the eternal word of Hashem if you believe in Him, as do many soldiers Baruch Hashem.
So what does one do if the Israeli army requires soldiers to defy the Torah?
Trouble.
One of the major rabbis of צה"ל got in trouble for upholding the halacha and had to publicly retract, and said that he remains present when women sing and so too should soldiers. He also said that he was in favor of women serving in the army [against the psak of just about every single Rav since the birth of the State. I am not linking the article because it is not lashon tova...]. Had he not said so in all likelihood he would have been booted. This is classical רב מטעם - the rabbi who is working for the authorities that was prevalent in Eastern Europe before the war, where rabbis bent [or worse] the halacha to meet the needs of their superiors. That is super problematic. [BTW - In that link there is a typo. Instead of "Ravish" it should say "Rivash"].
The solution of the Charedi torah world to this problem is to discourage their youth from entering the army, and so they generally don't serve [or do at an advanced age with a shorter service in order to legally join the work force] unless the boy is ALREADY off the derech in which case Rav Shteinman felt that the discipline of the army could be helpful. But the good boys remain in Yeshiva and then go to work when necessary.
The Dati Leumi are in a quagmire because they believe that the army is holy and that to serve is a huge mitzva. But what do they do about the many conflicts that arise?
Problem.
Rav Aviner, a leading rabbi in the Dati Leumi world, talmid muvhak of Rav Tzvi Yehuda Kook, had this surprising thing to say - DON'T GO!!
If you can't serve in a halachically permissible way [unit without girls etc. etc.] - then don't serve.
My own take is that WE WANT MOSHIACH NOW at which time לא ישא גוי אל גוי חרב ולא ילמדו עוד מלמחה and we can do away with the army and devote ourseles to love and not war.
במהרה בימינו!!!!