Before the reception of holy communion and the reading of scripture, Mass begins with a confession of sins, recognizing our faults before God.
The most common form of this confession is known as the "Confiteor" ("I confess").
The General Instruction of the Roman Missal explains the reason for this part of the Mass.
This type of public confession of sins has its origin in the Jewish synagogue and was part of early Christian liturgy during the 1st century.
For example, the 1st-century Didache states, "But every Lord's day gather yourselves together, and break bread, and give thanksgiving after having confessed your transgressions, that your sacrifice may be pure."
Offering thanksgiving and "breaking bread" can only be done after confessing our sins.
One of the primary sources for this ancient tradition is the story told by Jesus of the Pharisee and the tax collector.
Which person did Jesus praise?
God wants us to have a humble heart and he teaches us through the Mass how to practice that humility.