I don’t see what you mean, he had time to atone and was acting on Dumbledore’s request. It was immoral true, but he did have time to repent (at least in theory since it’s not mentioned in the story).