This is because the system in which the Avodah of prayer refines the Yetzer HoRa is from below to above. The method being that the refiner (the Divine soul) permeates the refined (the animal soul) and operates from within. Which is why it is a battle and requires a concerted effort.
However, the refinement which the Avodah of Torah study achieves, operates from above to below. (As is known that the Torah is referred to as ‘bread from heaven’). This refinement is a much smoother process and happens automatically, as a result of one’s Torah study he draws down and reveals G-dliness upon himself, as a result of which the Yetzer HoRa becomes nullified and refined on its own.
Accordingly, it is understood why this system of refining one’s Yetzer HoRa can be considered an optional battle. Because there are other options of refining the Yetzer HoRa in a relaxed manner as a result of Torah study. This is what is referred to at the end of our Parsha when the Torah writes: ׳וֹלְך מִּכָל־אֹיְבֶיך ג וְהָיָה בְהָנִּיחַ ה׳ אֱלֹקֶיך “It will be, when HaShem your G-d grants you respite from all your enemies” because then there will be no need for any war.
