Even if there is only a single enemy standing somewhere nearby, towers will keep shooting. The radius over which this works is quite big, too. This can be used to your advantage in siege defenses: Even when you have lost a particular section of the walls, getting a fast unit (i. e. cav) near a tower makes it shoot. You can cause a lot of enemy fatalities by making use of this feature of "auto artillery".