Catholics believe that there is an eternal punishment due for sin, and a temporal punishment. Simply put, if you steal the widow's last mite you deserve to go to hell, but you ask forgiveness and Christ forgives you, thus you are absolved of that eternal punishment. However, you still have to give that mite back, and make restitution for what you did to that poor widow, perhaps even go to prison. That is temporal punishment.
If you get hit by a car before this temporal punishment is taken care of, it still must be paid. That is where purgatory comes in.
Oh wonderful, some say, look how easy the Catholics get it. Do anything they like, then mouth some words and they still get to go to heaven.
And they'd be right if not for a couple little facts that don't get spoken much. The fires of Hell and the fires of Purgatory feel exactly the same. The only difference is that Purgatory's fire ends. Eventually, that is, and that's the other rarely mentioned fact. There's a reason the Catholic church used to speak of this penance equaling 400 days in purgatory, or that pious practice equaling 30 years in purgatory. It's not because Purgatory has literal time, it's because there is no penance so efficacious as one performed in faith, and in Purgatory there is no faith. You know for sure where you're going.
In short, there is something in the nature of sin that requires some measure of suffering to expunge it.