Another interpretation: "for it was near" (Exodus 13:17). Near was the first war to the second. [Had Israel taken the short road, the first battle would have come hard upon a second, leaving them no respite.]
The Near Road and the First War Pressing on the Second
Yalkut Shimoni on Torah 226:7
דָּבָר אַחֵר, כִּי קָרוֹב הוּא, קְרוֹבָה מִלְחָמָה רִאשׁוֹנָה לַשְּׁנִיָּה.