The Apostle John, an eyewitness, recorded more directly
the words of Jesus giving the power to forgive sins to all
the Apostles after the testimony of the Resurrection.
John 20:23
Whose sins you forgive are forgiven them, and whose
sins you retain are retained.
Many Christians ask why confession of sin is required for
forgiveness. The Church responds that the need for personal
confession of sin is required in order for forgiveness
because that is the only way a confessor can judge
whether to forgive or retain sins. A judgment cannot be made
unless the sin in question is known and the disposition
of the penitent is also known.