Oops, forgot. Yes, historically it was also due to the car or horse buggy hitting the mud/water puddle near the sidewalk
That was still the custom when I was in college, and probably later. My understanding of it was that historically, it was to protect the ladies from the slops being thrown out of upper windows. But by my time, I think it was just in case a car hit a puddle. It was mostly just a habit.