And they knew, that if they wanted, G-d forbid, to be victorious over Israel, they should not rely on their own stength. For in those times, there was no nation in the world stronger than Egypt, and even Egypt had not been able to defeat the Jews. Hashem had stricken Egypt to destruction, and brought us out of Egypt with a raised hand. At first, Bilam tried to awaken Hashem's decree of Judgment on the Jewish people with his curses, but to no avail. Later, he tried a different method, which succeeded- he caused Israel to sin.
Sin creates a separation and mutual estrangement.
In this way they will fall, even without a war. And, unfortunately, a plague broke out among the Jewish people because of this. It is true, the army is necessary, but the people who are learning in yeshiva add Torah, kedusha, mitzvot, and cause the shield of the Creator to be spread over us. Only in this way can the army be victorious. And this principle is not only true on a universal level, but also on an individual level.