Do not even the tax collectors do the same?
What do most of the people who sit on pews and most of the people who sit in jail cells have in common? Both have a pretty good appreciation of their own righteousness.
Do both groups of people typically do good things? I think so. They certainly are aware of the good that they do.
But, unless he has been falsely convicted, the person sitting in the jail cell has done at least one thing that make him unacceptable to society.
Neither are righteous enough.