Greens hanging around (waiting for reinforcements) on the far side of the gatehouse door, when they could be hunting down the pinks and helping their people still scaling the ladders.
Just hanging around by the door when they could be helping their green allies take that wall.
Still hanging around waiting for reinforcements, despite dozens of troops being in a good position to go kill the pink defenders.
In the last shot you see that the vast majority of the army had reached the far side (or rather, all the other green AIs that were not near the doors had died, so it amounts to the same thing - "enough men are on the far side of the door") of the door so they now switch to an "extermination" sub-routine and hunt down the defenders in a giant mob.