what i have seen happen, is that if you hire a merc away from an AI (could be a player, if there were ever a player so stupid), the merc will keep his current orders - which, in this case, was probably "build fortification" - and you get a fort for free. or the money for it, if you cancel the orders...