The different situations give different predictions for how people will act next time. You want to lock attempted murderers in jail because otherwise they might succeed next time. (And knowing that you might get punished even if you don’t succeed gives a stronger deterrent to potential murderers). Likewise, if someone makes good decisions trying to save lives, but is unlucky, you still have reason to trust them more in future, and to reward them to encourage this behaviour.
The different situations give different predictions for how people will act next time. You want to lock attempted murderers in jail because otherwise they might succeed next time. (And knowing that you might get punished even if you don’t succeed gives a stronger deterrent to potential murderers). Likewise, if someone makes good decisions trying to save lives, but is unlucky, you still have reason to trust them more in future, and to reward them to encourage this behaviour.