Horses are herd animals, as well as being less intelligent than humans and elephants. They are considerably easier to lead, but can still disobey orders from the rider.

Specifically, the only reason that polearms repel cavalry is that horses are unwilling to impale themselves on pointy things. A rider that attempts to force their mount into a mass of phalangites will not succeed, and likely end up lying on the ground when the horse has a panic attack right before impact.