Catholics understand there to be two consequences of sin. Ultimately, both consequences are related to sin creating a disunion with God. Serious sins can lead to a consequence of eternal damnation. All sins also bring to bear temporal punishment. This can be related to parental discipline. My young adult child could do something so horrendous that I might potentially evict him from my house. However, he is sincerely repentant, and I forgive him. He can stay. (This can be likened to the forgiveness of eternal punishment received in Baptism of Confession). However, I might still punish the child as a form of discipline. This isn’t for my pleasure, but because I love them, and because this discipline can help build character and help transform them into a better person. That is, in a sense, what purgatory is for. To complete any temporal punishment not attained in this life, for our purification and detachment from sin.
Indulgences have no bearing on forgiveness of eternal punishment. They cannot save you. They cannot be applied towards future sins. But they can mitigate the temporal punishment of past sins, which the Church has the authority to do from Christ. They can apply his infinite merits and the finite merits of the saints to satisfy your temporal punishment due. Traditionally, indulgences were assigned a time frame. This hearkens back to the ancient Church when sins were assigned heavy penances. If you got a one year indulgence, this wasn’t one year out of purgatory, it was equal to one year of ancient Christian penance for sin for the remission of the temporal punishment due. The Church has moved away from that standard of measurement, even so.
Indulgences are also for our edification. They aren’t transactions, they require a proper disposition and intent on the part of the person receiving the indulgence. Indulgences are also no longer granted for charitable giving and alms due to issues with corruption in practice.
But the Church has every right to grant indulgences through the authority of binding and loosing, setting penances, etc… We just see the consequences of sin differently than many of our Protestant brethren, as being two-fold, and unless one understands that, Purgatory and indulgences won’t make sense.