Because the tanks are using the default unit AI, which AFAIK amounts to "when your weapon is ready to fire, shoot the closest enemy in range". The zergling AI knows the attack range and rate of each tank so can ensure that the closest zergling is always on its own when a tank is ready to fire.
What would be really interesting is putting a similar smart AI on the tanks, which could make decisions like shooting at the highest concentration of zerglings instead of the closest one, or holding its fire if one lone zergling is in range, but a clump of them is about to enter range.
Human players already do both optimizations with widow mines, which are a unit that takes several seconds to prepare its shot so it's feasible to retarget. It's not feasible for humans to do this with tanks though as they fire immediately and automatically.
You could even see counterevolution as two AI algorithms become better at predicting what the other will do.