I think “pay for the” is looking at it the wrong way.
You may not have ever been with someone who was dying; I have been with several. And contrary to popular opinion, each and every one of them (and likely, the vast multitude who die) still had a predilection to sin. The term "concupiscence might appropriately apply. We all have a tendency toward sin, and most of us die with that tendency still as a part of “who we are”. And that has to be worked out, or purged, before we have the beatific vision.
That is not to say there is no need for recompense for the sins we have committed; but let’s take an example. Someone who has a hair trigger to anger is going to lash out at people; the action is often out of proportion to the matter at hand. Near their death, they may be less prone to that hair trigger reaction, but less prone means that it is still there to some extent. That individual may have been very devout also, and been granted many indulgences for their past behavior; but the tendency is still there. That needs to be rectified/purged, and that too is part of the issue of purgatory.
There are pious commentaries by various saints who have reported visions, and among them are comments about someone being in purgatory “until the end of time”.
For starters, we are not required to believe that is necessarily true; in addition, a soul has no body so there is no time dimension as we understand time; so the commentary may be taken with a grain or two of salt. We don’t know, and the Church does not say, how long or what the process is in purgatory; but anyone there is guaranteed heaven, or they would be elsewhere. And we often hear stories about the pain of purgatory; not physical pain; but certainly there is emotional pain or something near it that we all experience when trying to overcome our unwanted tendencies.