This is a large issue, especially for large numbers in sieges.
Since defenders spawn at the front gate, when they're reassigned to the section they hold, they do everything in their power, even if attackers are already on the streets to get to the compromised ladder position. Defending archer AI is pretty sloppy and inefficient too.