I'm an atheist, however I was raised a strict christian.
The answer to that conundrum is that God would presumably know the intentions of that individual and all the circumstances of his good and bad actions and know whether he was acting out of a self serving heart or a truly repentant one inspired by his faith... And he would be judged accordingly.
This is the sort of thing that's a good argument against Pascal's Wager.
"I believed in you, God, because I thought it sounded like an easier, safer route."
"

"
If you're going to have a religion that has a hell and a path to redemption then salvation through good works makes a hell of a lot more sense than salvation through faith but then religions don't have to make any sense.
Salvation through faith alone is a preacher babble cop out for rationalizing why bad things happen to good people.
Or the "We can't understand God's reasons for doing things" bit.
There's a hell of a lot of horrible things in the world.
Upper management is doing a piss-poor job in the Love & Benevolence department.
The other cop-out then: "It's our own fault. Two people did something naughty several thousand years ago, so billions of other people, through absolutely no fault of their own, also suffer terribly as a result, because of God's sadistically tough love."
Good works will not get you to heaven, but faith will. If you believe in God and that his son Jesus died for our sins (taking our place, the ultimate sacrifice)and rose again, and accept him as your personal savior, that gets you to heaven. Everything else you do good is simply being obedient and showing an example. But no matter how hard we try we still sin, that's why the only way to be cleansed is by accepting Jesus as our savior. The pope should really reinforce this fact, as I find often catholic priests don't put enough essence on that. John 3:16 is key. For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
So the Human v1.0 unit will sin
by design, and the Semi-Dead Jesus Hotfix is a cobbled-together patch meant to take care of that problem, though it doesn't kick in until you
die, which will come at a time that will not be revealed to you. The manner of death will also be a surprise. (Humans like surprises, right?) Oh, and suicide is not permitted either, so no fast track to final salvation for you!
...Hm, but suicide is a sin,
and we're all sinners by design,
and all sins are viewed as being equally bad,
and Jesus died for our sins...
Old school or old testament? 😛
I think it makes more sense to reserve hell for those believers who supposedly know better than to disobey the commandments of their Christian god and still choose to disobey anyway.
I wonder if the murderers have to share bunks with people who worked on Sundays?