It didn’t stop all of them, but it probably caused a huge social/cultural crisis – death in battle against a fellow horseman is honorable, but to be defeated by a non-horserider is a huge shame.
So why risk a dishonorable death, when the city-dwellers will give you riches for going away?