They train soldiers, but again most soldiers, at least citizen soldiers wouldn't live in the barracks I don't think? But its not completely out of the question. Would be curious to what people think, and maybe it would be unique to a couple more "agressive" civs.