This verse is also part of Jesus’ parable of the Pharisee and the tax collector. He contrasted the self-righteous attitude of a proud Pharisee with the humble and penitent attitude of a tax collector.
Jesus declared that the tax collector, rather than the Pharisee, was favored by God. This must have been a surprise to many in the audience, because the Jews considered tax collectors to be traitors and degenerate sinners (read Matt 9:10; Lk 5:27).
But the tax collector’s attitude was what mattered to Jesus. He expressed his extreme remorse over his sin by beating his breast, a gesture of grief and mourning (Nah 2:7 NIV). He recognized his sin, repented of it, and pleaded for God’s mercy and grace.
LUKE 18:13 – The publican [tax collector, NIV], standing afar off, would not lift up so much as his eyes unto heaven, but smote [beat, NIV] upon his breast, saying, God be merciful to me a sinner.