First of all, where does it say in the Bible that everything we can know about what Jesus taught is IN the Bible? Answer: Nowhere. In fact, it says the opposite. See John 21:25. If we compiled every quote of Jesus in the New Testament into one document, it would be only 15-20 pages long, at most, and take less than two hours to read aloud. Would it be reasonable to think that in Jesus’ three years of ministry that He only spoke for less than two hours? No, hardly! Yet, Jesus commanded the Apostles (and their successors) to teach EVERYTHING that He had taught them (Matt 28:20). So, there’s a gap. The Apostles and their successors are to teach everything, but not everything Jesus taught is in the Bible. So, how can this command be fulfilled? See 2 Thes 2:15 where Paul tells us to hold to BOTH oral tradition (a.k.a., Holy Tradition) and written tradition (Scriptures).
Anyway, back to your original question, see John 20:19 and following. The Apostles are in the upper room and Jesus appears to them. He said, “Peace be with you.” Then it says,
When he had said this, he showed them his hands and his side.
13 The disciples rejoiced when they saw the Lord. Jesus said to them again, “Peace be with you. As the Father has sent me, so I send you.”
Jesus gives them His peace and says that “As the Father has sent Me…” How has the Father sent Jesus? With ALL heavenly authority, including the authority to forgive sins! Remember the Pharisees complaining about Jesus forgiving sins, when they said, “Only God can forgive sins!”? Well, Jesus is God.
Code:
Now, there are only two times, in all Scripture, where God "breathes" on man. Once in Genesis, when He creates Adam, and once in the following passage from John 20:22 where Jesus (God) breathes on the Apostles, and it says,
"And when he had said this, he BREATHED on them and said to them, “Receive the holy Spirit.”
Code:
This had to be an awfully poignant moment for them. Jesus is doing something big here, as I tell young people. Let's see what the very next passage says...
John 20:23 “Whose sins you forgive are forgiven them, and whose sins you retain are retained.”
Now let’s recap. Jesus appears, does something special (breathes on them), gives them the Holy Spirit, and then delegates HIS authority to forgive sins to the Apostles! And, from a practical standpoint, how can they forgive anyone’s sins unless they know what sins there are to be forgiven? By the person confessing those sins to them. THIS is the institution of what the Catholic Church calls the Sacrament of Confession.
There’s a good audio that explains Confession in more detail, if you’re interested. You can get it here (it’s an mp3 file):
alabamacatholicresources.com/Downloads/Confession.mp3