Fr. Eamon Tobin has written in The Sacrament of Penance:
In response to this question, the first remark I often make is, "Why do we not object to having a mediator, another man, at the sacrament of baptism? Why don’t we just baptize ourselves?" Baptism, among other things, cleanses us of sin. The sacrament of reconciliation is like a second baptism; it cleanses us of post-baptismal sin. If we have no objections to another man’s mediating to us God’s grace in the sacrament of baptism, why should we object to another man’s mediating God’s grace in the sacrament of reconciliation?
The primary reason, however, why the Catholic Church asks her members to confess their sins to a priest is simply because the Church has always believed that sin, however private, is a community affair. Every sin, however small, wounds the Body of Christ, the members of the Church. . . . When any of its members sin, they all suffer. Moreover, because my sins wound the community and diminish its effectiveness, reconciliation must include the community and not just God. In the confessional, the priest is the representative of God and of the community. In the confessional, the priest represents the whole Christ, the Head (Jesus) and the members (the Church). [Emphases added]
Strictly speaking, there is no such thing as a "private" sin—not in the sense of a sin that affects nobody but myself. There are secret sins, but there are none which are matters affecting "only myself and God." Likewise, our penitence benefits the whole Church, so we celebrate reconciliation communally.