Why do you confess your sins to a priest?
The Scriptures are explicit when they state that the power to forgive sins was given to the Apostles.
21 He said therefore to them again: Peace be to you. As the Father hath sent me, I also send you.
22 When he had said this, he breathed on them; and he said to them: Receive ye the Holy Ghost.
23 Whose sins you shall forgive, they are forgiven them: and whose sins you shall retain, they are retained.
Furthermore, from the History of the Church, we clearly see that it was always the practice of the faithful to confess to priests. Indeed under the persecutions of Decius in 250 and Daia in the early 4th Century, we see the controversy among the Church as to how the lapsed (those who denied Christ under persecution) should be readmitted to the Church, and what their penance should be before they could be given absolution and fully admitted back into the Church to once again receive the Sacraments. See St. Cyprian of Cathage’s treatise on the lapsed (I read it only a few weeks ago, very good).
Furthermore, in the confessional, the priest acts in persona Christi, in the person of Christ. He is not acting as an individual man, but as Christ through the ministry of the Church to give absolution to the penitent. In that sense, you are going straight to God with your sins, for only God has the power to forgive sins. However, he has chosen his priesthood to be the ministers of that forgiveness.
Contrary to what other posters may have implied, if you have commited mortal sin, it is necessary to receive sacramental Confession before receiving the sacraments, particularly receiving Holy Communion.
While it is true that by perfect contrition, it is possible to be forgiven mortal sins outside of the confessional, we would have no way of knowing this occured except for a special revelation, it is also more difficult to have perfect contrition than imperfect contrition (you can be forgiven with imperfect contrition in the confessional, but not without a priest).