People can be really careless around cars. They frequently think that they can be seen when they can't, don't look before entering the road, or just expect that the driver will have to avoid them like it's some kind of game. I've had to avoid each of these more than I can count.
I came very close to a situation like the Uber accident once but fortunately it was daylight and I saw that the person was clueless. I was driving southbound on this stretch of road where the speed limit is 55 mph (traffic is usually going faster than that). A girl was walking on the edge of the road with her back to traffic where the red arrow is. I saw that as a very dangerous situation for her and kept focused on her as I approached. Just before I got to her position, she abruptly turned right and stepped into my lane without looking. She barely stepped back as I swerved away from her. If I had been paying as little attention as she had, she would have been killed for sure.
View attachment 222387