They generally do so when they’re older than the people who get executed for the same accused crime. Meaning there’s a chance they’ll have a life outside of prison if they’re innocent.
Again, you can’t unkill someone. You can, however, not intentionally kill them.