Paul accuses his Jewish contemporaries that they “boast in God” the wrong way. We could infer from this is that people come before God to boast in themselves, expecting him to praise their good works. This could be an interpretation of the parable of the pharisee and the tax collector in Luke 18, as well.
I think a case could be made that Paul thinks that the problem with legalists is that they want to boast in front of people and don’t really care that much about God at all. After all, look how Paul’s critique works:
17But if you call yourself a Jew and rely on the law and boast in God 18and know his will and approve what is excellent, because you are instructed from the law; 19and if you are sure that you yourself are a guide to the blind, a light to those who are in darkness, 20an instructor of the foolish, a teacher of children, having in the law the embodiment of knowledge and truth— 21 you then who teach others, do you not teach yourself? While you preach against stealing, do you steal? 22You who say that one must not commit adultery, do you commit adultery? You who abhor idols, do you rob temples? 23You who boast in the law dishonor God by breaking the law. 24For, as it is written, “The name of God is blasphemed among the Gentiles because of you.”
25For circumcision indeed is of value if you obey the law, but if you break the law, your circumcision becomes uncircumcision. 26So, if a man who is uncircumcised keeps the precepts of the law, will not his uncircumcision be regarded as circumcision? 27Then he who is physically uncircumcised but keeps the law will condemn you who have the written code and circumcision but break the law. 28For no one is a Jew who is merely one outwardly, nor is circumcision outward and physical. 29But a Jew is one inwardly, and circumcision is a matter of the heart, by the Spirit, not by the letter. His praise is not from man but from God.
Now, if Paul was worried about people who are trying to impress God, why on earth did he end with a statement that one should want God to be impressed rather than man.
Could it be that in claiming to be ” a guide to the blind, a light to those who are in darkness, 20an instructor of the foolish, a teacher of children” that the Jews are more concerned with how others view them rather than what God really thinks (thus, verse 24 shows that God is frustrating their wishes).
And isn’t it perhaps significant that, though the Pharisee prays “I thank you God…” he also does so out loud in public so that he is boasting before men?
And then consider Galatians, especially as it concludes in chapter 6:
3For if anyone thinks he is something, when he is nothing, he deceives himself. 4But let each one test his own work, and then his reason to boast will be in himself alone and not in his neighbor. 5For each will have to bear his own load…. 12 It is those who want to make a good showing in the flesh who would force you to be circumcised, and only in order that they may not be persecuted for the cross of Christ. 13For even those who are circumcised do not themselves keep the law, but they desire to have you circumcised that they may boast in your flesh.
And what does Jesus say in John’s Gospel?
41 I do not receive glory from people. 42But I know that you do not have the love of God within you. 43I have come in my Father’s name, and you do not receive me. If another comes in his own name, you will receive him. 44How can you believe, when you receive glory from one another and do not seek the glory that comes from the only God?
And what is Jesus’ concern in the Sermon on the Mount?
“Beware of practicing your righteousness before other people in order to be seen by them, for then you will have no reward from your Father who is in heaven.
2 “Thus, when you give to the needy, sound no trumpet before you, as the hypocrites do in the synagogues and in the streets, that they may be praised by others. Truly, I say to you, they have received their reward. 3But when you give to the needy, do not let your left hand know what your right hand is doing, 4so that your giving may be in secret. And your Father who sees in secret will reward you.
5“And when you pray, you must not be like the hypocrites. For they love to stand and pray in the synagogues and at the street corners, that they may be seen by others. Truly, I say to you, they have received their reward. 6But when you pray, go into your room and shut the door and pray to your Father who is in secret. And your Father who sees in secret will reward you…
16“And when you fast, do not look gloomy like the hypocrites, for they disfigure their faces that their fasting may be seen by others. Truly, I say to you, they have received their reward. 17But when you fast, anoint your head and wash your face, 18that your fasting may not be seen by others but by your Father who is in secret. And your Father who sees in secret will reward you.
19“Do not lay up for yourselves treasures on earth, where moth and rust destroy and where thieves break in and steal, 20 but lay up for yourselves treasures in heaven, where neither moth nor rust destroys and where thieves do not break in and steal. 21For where your treasure is, there your heart will be also.
22 “The eye is the lamp of the body. So, if your eye is healthy, your whole body will be full of light, 23 but if your eye is bad, your whole body will be full of darkness. If then the light in you is darkness, how great is the darkness!
24“No one can serve two masters, for either he will hate the one and love the other, or he will be devoted to the one and despise the other. You cannot serve God and money.
25 “Therefore I tell you, do not be anxious about your life…
Reading Matthew 6 as a contextual whole, one might wonder if “money” doesn’t also represent the need for human praise. And, likewise, while we are not supposed to be anxious about real needs, how much more should we not be anxious about what other people think?
Our treasure is in heaven, not earth, and our praise is from God, not men.
Trust the God who sees in secret for your righteous standing, and do not try to gain righteousness in the sight of anyone else.
Related: Ready to Applaud