There are of course circumstances where a driver has little chance, like a kid running from between parked cars after their ball, someone not looking, or a cyclist running a light.
The police generally investigate the scene and assess what happened, measure out distances, skid distances to assess driver speed, and seek witnesses etc if there's reason to think circumstances aren't straightforward or there's serious injury or death.
There's also some degree of marshalling on busiest roads by putting up railings in some places to encourage crossing at safer spots, or the crossing a few yards away.