Safety was one reason. But, I have read numerous replies over the years that state it goes back to the days of unpaved streets that often had horse drawn wagons etc. Getting out on the right side, passenger side, kept all riders from getting muddy or dung laden boots. The practice didn't change, for whatever reason, for many years afterward. ((If roads in this modern era get much worse, the practice may see a return)).