dylanschrader has it about right. Here’s another way of looking at it.
Human beings are designed to operate with God’s Grace in them just like an engine is designed to operate with motor oil in it. If an engine operates with that oil, it will be fine. However, if someone decides to let all the oil out and run the engine, it’s going to be damaged, and the longer it’s run without that oil the more damage will be done. Even if you put oil back in the engine again, it’s still going to be damaged and not operate at its full potential. Now, in this case, you could slowly repair the engine piece by piece, or you could just rip the whole thing apart and rebuild it all at once.
When human beings let the Grace of God out through sin, it does damage to them. We can get that Grace restored in confession, but even then we are still not working quite right - we aren’t operating at the full potential God made us for. In this life, we can gradually be repaired piece by piece - we can grow a little in humility here, or in in purity there, or in charity over there. If, when we die, we aren’t back to our full potential, in Purgatory God essentially rebuilds us all at once so we will be capable of operating at our full potential in Heaven.
The main difference, of course, is that the potential of the car that it isn’t reaching is the potential to bring a person from point A to point B, whereas the potential that human beings are not reaching is the potential to Love.
Praying and indulgences and things such as this are sortof like taking an engine part that God gave us and giving it back to Him for use in that person.