It appears to do two things.
First, it causes higher-tier troops to be recruited at that center when you leave money for auto-recruitment.
Searching for "slot_center_has_barracks" in module_simple_triggers.py (in the dev kit) will let you get a better idea of exactly what's going on, but basically, a random number 0-99 is being generated, and the value of that number determines which party will be recruited, with lower numbers resulting in parties with higher-tier troops; the barracks simply reduces that number by 15 after it is generated (which is enough that it will often, but not always, result in a higher-tier party than you would have gotten otherwise).
Second, it gives the villages associated with that center a chance to have upgraded units from what they would have provided without it (as in, it appears to literally just pick the first upgrade option of the troop that had been selected before that check).