Baptism is for unbelievers converting to Christianity. Confession is for baptized Christians who seek forgiveness for the sins they committed after their Baptism.
Baptism forgives all sin and remits all their punishment. To put it simply, if you die right after your baptism (barring any sin committed after that), you go straight to heaven without dropping by purgatory. This is much like the grace given to the repentant thief who was crucified with Jesus.
I have read that temporal punishment for sin may still remain after Confession. One reason is the penitent’s contrition may not have been perfect and that the soul still needs to be purified from attachment to sin.
But why is it that Baptism purifies the soul completely? Is it because our sins are rendered more serious because Baptism has already endowed us with much assistance by the Holy Spirit to keep us away from sin?
I understand, though, that a plenary indulgence can have the same effect on a penitent. But it is still dependent on the penitent not having an attachment to sin.
What’s the difference between Baptism and confession, or the soul of a catechumen and an already baptized soul, that the latter is encouraged to have a share in atoning for his/her own sins?