It could be useful when you find yourself surrounded by foes, or as a form of temporary fortification. Also could come as a skill for selected heroes or units.
Instead of moving, the army could chose to "dig in", creating temporary fortified camp. Roman legions did it every day, and modern troops do it as well. It would translate as a defensive bonus for the fortified side in tactical battles. The bonus could rise slowly to certain maximum, say 10, 20, 30% max after 3 days (would have to be tested). If we had walled sieges, the fortifications could be on tactical map too. If terrain had an effect on the battlefield, it could affect the quality of the fortifications.