But that doesn't necessarily mean that the law should try to perfectly reflect that moral imperative. Laws generally don't work well when they attempt a high resolution of morality, because the law can only approximate justice, and the more complex the approximation, the more arbitrary and ambiguous the law becomes, which is itself unjust.
The specific problem here is who decides whether the driver did "enough"? The driver can say "If I tried to slam on the brakes, I was afraid my car would spin out of control" or "If I tried to swerve away, I was afraid I might collide with someone". They might say "I thought there was a car behind me, and if I hit the brakes, I would injure that person. It was an honest mistake that the car which used to be behind was no longer there." Etc.
Then you have to decide whether you believe them. In an environment where someone is innocent and must be proven guilty, you don't get a whole lot more precision by adding more precision to the law. Or do you drop the requirement of presumption of innocence?
Also, that leaves a lot of discretion to the prosecutor, which may be abused, or imposed arbitrarily, and is ambiguous.
So you are creating a lot of ambiguity in the law in an effort to precisely match the moral outcome.
The other option is to have clear responsibilities. The pedestrian must do X. The driver must do Y. If the driver does Y, he is not charged. When both X and Y are followed, there can be no accident.
But "Must do all you can" is not clearly defined. "Not speeding, obeying traffic signs" -- this is more clearly defined. So in AZ, the law is a little more clear, but at the expense of not being as morally precise. It's a reasonable trade off. It may suffer from an abstract moral critique, but I'm not sure on balance it delivers less justice.