Why does the Pasuk say, כי תצא למלחמה על אויביך, “When you go out to war on your enemy,” when it should really say כי תצא עם אויביך במלחמה, “When you will be at war with your enemy?”
One possible answer is that we read this Parsha during the month of Elul, a time for Teshuva. This Pasuk speaks not only of a physical war but of a war that is both physical and spiritual. The spiritual war is between a person’s Yetzer Hara and his Yetzer Tov. The Zohar compares the inner struggle of a man during prayer to a time of war. The Yetzer Hara tries very hard to stop a person from praying with Kavana and from doing Mitzvot. One must fight very hard in that war in order to win. Gemara Shabbat (104a) says, בא ליטהר מסייעים אתו, “One who wants to purify himself is assisted from heaven.” The Torah is assuring us that if we want to go out to war, כי תצא למלחמה על אויביך, with our Yetzer Tov, we will win the battle because Hashem will help us.