Scripture advises that we should confess our sins “one to another,” which many non-Catholics take to mean confessing to anyone who’ll listen and, presumably, “forgive”. However admirable the sentiment may be, a glance through the preceding two verses of James shows that he was referring to priests (i.e., those who have authority in the Church). Confession to priests is the only way to receive absolution, and this teaching is based on the following:
Matthew 9:6; 18:18 (wherein Jesus gave His disciples the power to bind and loose); Mark 2:10; Luke 5:24; John 20:20-23; 2 Corinthians 2:10; 5:18; James 5:15-16; Acts 19:18; 1 Timothy 2:5; 6:12; Leviticus 5:4-6; 19:21-22; 2 Samuel 12:14 (God has forgiven David’s sin, but David must nevertheless pay for it—temporal punishment—by losing his child); Nehemiah 9:2-3; Sirach 4:26; Baruch 1; 1 John 5:16-17.
We therefore find plenty of Scriptural basis for the sacrament. John 20:23, where Jesus said, “Whose sins you shall forgive, they are forgiven them; and whose sins you shall retain, they are retained,” raises an important question: How can the disciples forgive sins unless someone is confessing to them? But let’s again back up a bit. Note the progression of the previous two verses: Jesus (God) first says to His disciples “as the Father sent me, so I send you,” and then He breathes on them and tells them to “receive the Holy Spirit.” There is just one other time when God breathes on someone, and that’s Genesis 2:7, when God breathes life into Adam.
Many non-Catholics believe that God can and often does use their Protestant ministers as His instruments in physical healing. But what's more important, physical healing or spiritual healing? And if anyone can forgive sins on behalf of God, why didn't James just tell ordinary Christians to pray over the sick instead of advising them to get presbyters to do it?
The questions remains for many people, including even some Catholics, why not just confess your sins directly to God? It is God, after all, whom our sins offend. Why not just pray and beg His forgiveness? As Catholics, we are confessing directly to God, as well as through His ministers, because that is what God taught us to do in 2 Corinthians 5:17-20. The sacrament of Penance ensures that our confession will be properly disposed: it’s part of the priest’s job to ensure that a fitting work of penance be prescribed. The priest does not himself forgive sins, but merely acts on behalf of our Lord, in persona Christi.
Now, what did the Fathers teach about the practice of confession? The Didache (which, if not written by the Apostles themselves, was almost certanly written by their disciples, and in any case remains the earliest example outside the Bible of Christian teaching) says “thou shalt confess thy transgressions in the Church.” That certainly seems unequivocal, but it’s a directive. Did the early Christians actually abide by it? According to Irenaeus, in 180 A.D. public confessions were commonplace. And did the Fathers believe that priests had the authority to hear confessions and absolve people of their sin? Hippolytus did. In 215 A.D. he wrote that priests had the authority, given by our Lord, to absolve people of their sins. And in 220 A.D. Tertullian wrote that by papal edict, those who had confessed their sins (specifically adultery and fornication, in that decree) were forgiven.
So we’ve established a Scriptural basis and cleared up any doubt that the early Church Fathers not only believed the sacramental authority to bind and loose, and to hear confessions and forgive sins, extended to duly ordained Church clergy, but that that authority was exercised frequently. Aside from Scripture, then, there is also a very early historical precedent for the sacrament of Confession. It is not, therefore, a “Catholic invention” or innovation of man, as many Protestants and non-Catholics believe.