When a dwarf gets thirsty, he drinks. If he is a military dwarf (or off-duty military dwarf) carrying a waterskin with booze in it, he'll drink that. Otherwise, he will look for the nearest(?) barrel/pot full of booze and drink from that.
In the latter case, the dwarf picks up the barrel (it becomes part of his inventory) and commences quaffing. When he's done, he now has a barrel full of booze in his inventory (or an empty barrel, if he got the last sip). He will take this barrel to an appropriate stockpile. This returning-the-barrel bypasses all of the hauling labor settings, because it's already in his inventory.
So, how to avoid this? Make sure your military squads are set to carry booze (this is on by default), and that they have enough waterskins/flasks available so everyone can carry one. They will automatically take one as part of their uniform (it's not on the uniform/equipment screens, like the quiver that marksdwarves get). At some point, hopefully, they will get the idea that their waterskin should have booze in it, and then they will perform a "Fill waterskin" job. They need to do this job before they become thirsty.
If your military dwarves are so busy that they never had a chance to fill their waterskins before becoming thirsty, then you get the barrel-drinking as noted in the first paragraph, which takes ages. You want to avoid this.