....and in the earlier days it was nice to step out onto the "Boardwalk" than into a muddy street. But, mainly a safety issue to keep folks from getting run over by another vehicle which probably included horse and buddy in the early days.
And, a safety measure due to narrow roads when parking at sidewalks (in the good old days of narrow streets and roads with little or no shoulders).