Well the planes get close enough to shoot bullets and the AA gunners would not shoot and when I played the original TMO the AA gunners would shoot before the aircraft fired at the sub and for quite a while afterwards.
I know that the AA gunners now shoot at ships along with the deck gun. Perhaps that is why they no longer shoot at aircraft. If so, no problem, I usually dive when aircraft appears anyway. The AA gunners shooting at surface ships with the deck gun is big fun