If anything, sins used to be confessed in the presence of everyone in the church. As the Church grew, particularly after if became the official religion of the Roman Empire, this became problematic since the congregation often contained folks who would use such information in a less than Christian manner (their presence was much less likely while the Church was being persecuted).
Following this, confessions were done in the presence of a representative of the Church, someone who was sworn to confidentiality.