The Church teaches that the only ways mortal sins may be forgiven are confession and perfect contrition.
My guess is that almost none of us go walking around all the time with perfect contrition. We are all in a state of mortal sin at some point or another. My concern is that is seems like a matter of sheer coincidence, who goes to heaven and who goes to hell. You could die at literally any moment - you never know. And since we all have periods of time where we go walking around with sin on our souls, even the most righteous of us have the potential to die in a state of mortal sin and go straight to hell.
Where is the rationality behind this? The only way I can think to justify it is that either a) God will make sure we have perfect contrition if He knows we will die soon or b) God will postpone our death if He knows that we will reasonably make it to confession soon. Neither of these are set in stone as Church teaching. How do we know that anybody goes to heaven at all? How can anybody feel secure in salvation when they know that they could be planning to go to confession Sunday morning and die of a heart attack Saturday night?