Having a bunch of men who know how to fight, probably still armed, possibly less wealthy than when they left, possibly with a big chip on their soldier (like a returning crusader for example), return home all at once to a place that has presumably spent months or years living with out them and possibly been economically ravaged by an enemy force seems like a recipe for trouble. Did pre-modern and early modern states think of this as a problem that had to be prepared for, or was the idea that at least some of your neighbors would turn into bandits after a major war just something people accepted?
This refers to a specific time and place, but you might be interested in /u/Celebreth 's fantastic series of posts about demobilised Roman troops.