I dont know if its intended or a bug.
But sometimes the garrison just targets random troops on the backline (!) at the beginning of the siege or somewhere between. Even though there is a whole line of units in front of them. Archers, rockets, eagleeyes, it doesnt matter it happens sometimes, and sometimes it doesnt. Is it completely random and intended? Or a bug?
Important heroes and units get taken out at the start of the battle sometimes very randomly, which is weird.