In this passage we have Christ’s remarkably direct and forceful encounter with a Pharisee. Matthew 23 records similar words that Christ spoke of the Pharisees in general, but the two occasions are not the same.
We are all such slaves to sin that we can only control it to a limited extent. When we try to hold it back in one area, it bursts out in another. The trick of the self-righteous person is to take account of what others are capable of seeing. He knows that his fellow man cannot read his heart (which is the real source of the problem), and can only guess at what is in it by the external behaviour, so the self-righteous man focuses on what is external. He strives to govern his outward behaviour, while letting the inner self go unchecked. If he can succeed in controlling what can be seen, that will fool many onlookers. He does not worry about reining in the heart because there is no danger that it will be seen.
Now the attempt to live like this ends up producing this terrible dishonesty in a man. He knows his own heart and he also knows the outward appearance he is trying to create, and he knows the two do not agree. He becomes someone who can never share his real inner heart, lest his pretence be detected. Naturally, this playact does not fool the Lord, for the Lord has sight of that part of us which is hidden from the eyes of men. What the Lord sees is an outer being which is completely at odds with the inner being. He sees, in other words, a hypocrite.
The self-righteous person often has outward charm and decency, but along with that goes pride, snobbery, the wrinkling of the nose and looking down at others, and addiction to external form. Many diseases have symptoms which a doctor looks for. Self-righteous people are marked out by being concerned about the externals. Because they think they have succeeded in their fabrication, they expect to be admired for what they are. They are often intolerant of others who do not live up to their imagined standard, and they get ruffled by the smallest perceived wrong in others.