The Jewish people, at the time of Christ walking among them, had an expression that was well used:
“If only two people go to heaven, one will be a scribe and the other a Pharisee.”
But what does Jesus do to their expression?
Matthew 5:20 (ESV) For I tell you, unless your righteousness exceeds that of the scribes and Pharisees, you will never enter the kingdom of heaven.
See today we tend to denigrate the scribes and the Pharisees as being crooks and hypocrites, which granted some were. But the scribes and the Pharisees were well respected leaders who knew the Scriptures well. Even Paul appealed to the honor and respect granted Pharisees when brought before the high priest.
Acts 23:6 (ESV) Now when Paul perceived that one part were Sadducees and the other Pharisees, he cried out in the council, “Brothers, I am a Pharisee, a son of Pharisees. It is with respect to the hope and the resurrection of the dead that I am on trial.”
The scribes and Pharisees were meticulous observers of the Law of Moses and yet Jesus says they won’t be entering heaven? Jesus tells the people that unless they were more righteous than the Pharisees they would not enter Heaven either. That had to seem hopeless to those Jews sitting there.
Then Jesus goes on to explain true righteousness in the following verses and chapters.