did you leave a unit of troops guarding the side gatehouse, when you sent the rest of your army to the front door?

if not, it may be that the AI considers control of the gateway reverts to the defenders (imagine runners going and taking the bars off the gates that your guys had left locked)

if you did, and the gates still opened, this doesn't seem right and I agree with you