Jimmy Valentine shows far greater courage at the end of "A Retrieved Reformation" because he knows he is probably sacrificing everything to save the life of a little girl trapped inside a bank vault. Ben Price is not necessarily sacrificing anything. He is just resolving one of his many cases by letting one criminal go. He may not even have to report his decision to his superiors at the detective agency he works for. He believes that Jimmy Valentine is truly reformed and no longer a threat to banks or society.
Jimmy, on the other hand, is exposing his true identity as a master safecracker, and in doing so believes he is giving up the girl to whom he is engaged. This is presented as his greatest and hardest loss. He also believes he is giving up his profitable business in the town of Elmore, his identity as Ralph Spencer, and the respect of Annabel's family and that of most of the citizens of Elmore. Instead, he is accepting his fate as a prisoner in a state penitentiary, without any hope of another reformation after he is released. He was previously serving four years for one bank job, so he can expect to be sentenced to four times as long, sixteen years, because Ben Price would be arresting him for four bank jobs. The sentence might even be worse because he has a prison record. His friends on the outside may want to distance themselves from him because of this lengthening record. Jimmy's desolation can be seen in his behavior after he releases the little girl from the vault.
“Hello, Ben!” said Jimmy, still with his strange smile. “You’re here at last, are you? Let’s go. I don’t care, now.”
And then Ben Price acted rather strangely. “I guess you’re wrong about this, Mr. Spencer,” he said. “I don’t believe I know you, do I?”
Jimmy's "strange smile" is undoubtedly at the irony of fate. Irony is often like a bad joke. Just when he thought he had given up his life of crime in exchange for a much better life as an honorable citizen, an accident forces him to open his suit-case full of specialized burglar tools to release a little girl whose life is in danger.