Infantry is relatively cheap, so if the AI has roughly the same income as you, they're just being bad at army composition.
You have at least 3 ways to deal with infantry spam: Warlock's rain of fire, devastators, zeppelin's mustard gas. In other words, splash damage. Infantry doesn't stand much of a chance against these, particularly in front of devastators.


Unless otherwise specified, just an opinion or simple curiosity.