What determines whether the target shoots back at an attacking aircraft?

Solution 1:

Well, it turns out that after the December patch the behavior was changed - now combat units and cities always respond to air attacks (respond = attack back).

Notes:

  • Any unit and city responds to all attacks, even if it is attacked multiple times in a turn - just like units respond to all melee attack in a turn. So if a unit is attacked twice by two bombers in the same turn, it will damage both bombers back.
  • All combat unit types can respond, including non-powder units such as Pikemen (they use their anti-city animations). Anti-air units can respond (and inflict terrible damage) even if they have already intercepted an aircraft this turn.
  • Units can respond when embarked (using the attack animation of the embarked ships).
  • Non-combat units (workers, great people) do not respond.

Before the patch the behavior was a bit different, units did not always respond to attacks - that is no longer the case.