All right, I will talk now only about open battles (purpose of infantry in streets is obvious).
Infantrymen have more men in unit. If they are manouvred with care, they can seriously reduce effectivity of cavalry.
In low money, all cavalry can be particulary effective even against living players (although not overly effective I must say).
Archer heavy armies are bane of cavalry armies (My Parthian army just eats all-cav - and I have only two dedicated melee units - eles).
In high money cavalry heavy armies will lose badly as strong phalanxes can be afforded and fully upgraded. Spartan hoplites/sacred band will massacre any cavalry unit utterly (even when charged from flank/back).
Cavalry canīt hold in fight for too long as well as chariots.
Cav/chariots are good for thunderous charges which cause rout/riding on flanks and killing archers and many more things. But infantry offers you some sort of reliability and durability against archers.
I donīt want to say that cav is worse than infantry - but both have their places. All infantry wonīt be too effective mostly as well as all-cavalry. But both cases have exceptions.
AI is stupid - I would say it even that roughly. It just is. To certain extent, it can play reasonably, but it is outmanouvred far too easily. +important thing is, that it is impossible really to do with all your units - charge, withdraw, charge...it is possible only with pause button. And that isnīt usual in multiplayer. If you leave infantry to fight with cavalry, it is mostly fine. If you leave cavalry to fight infantry, it works opposite way.
+some tactics are unbeatable without infantry - without infantry, you wonīt be able to kill spartan circle with onagers (and occasionally cretans) in it.