The punishment part of the judicial system has several important goals. The heaven & hell system is ridiculously blunt.
A few of the roles of prison:
Locking up violent criminals protects the rest of the population from their potential harmful behaviour. Hell leaves them free to continue harming other people all their life. They are punished after their death when they can no longer harm anyone.
Another goal is to prepare for when you get out, to rehabilitate you. You screwed up, you serve your sentence, maybe learn a thing or two, and you turn a new leaf, become a contributing citizen again.
Going to hell is forever. There is no second chance.
Other types of punishment such as fines or community service aim for the « evil doer » to give back to their victims or at least to society as a whole. Again hell does not make up for the harm done.
Prison and fines are a deterrence. Society attempts to cut future crime by publishing the sanctions people would receive. Of course hell is a deterrence, but a surprisingly weak one. You would think that true believers would be model citizens. Somehow, deterrence seems to work when you have some contact with the people who were punished. We all have friends who have received a speeding ticket. And we read about prison conditions in the press. There is not much feed-back from hell.