For the most part people didn't ride horses to get around town (despite what Westerns depict). Horses were mostly used to pull carts moving goods around like trucks do today. The average city dweller walked or rode trams.
Even so, that's just using a cart and a hired one at that. I mean the analogy of a horse to a car (as in something you owned personally and rode around on) was never really true, at least in cities. Also, speaking of London, the Underground is surprisingly old -- the first parts of the system opened in 1863. Yes, Sherlock Holmes is often depicted as going by hackney, but had he really existed, he could have ridden the Tube.