There is more than one way to forage. At best, the army can pay the local inhabitants, maybe even a fair value, particularly if the area is nominally friendly. Even if the army "commandeers" supplies, it would want to keep the criminal activity to a minimum, if only because it is bad for discipline.
The Thirty Years' War is an extreme case, in large part because the armies were made up of mercenaries that were not getting paid regularly.
Pretty sure the locals are unhappy from the start of the foraging process, with all the stealing, murdering, and raping.