God loves it when man boasts in God, and God hates it when man boasts in man.
"Let the one who boasts, boast in the Lord" (2 Corinthians 10:17). "Far be it from me to boast except in the cross of our Lord Jesus Christ" (Galatians 6:14).
"The haughty looks of man shall be brought low, and the lofty pride of men shall be humbled, and the LORD alone will be exalted in that day. For the LORD of hosts has a day against all that is proud and lofty, against all that is lifted up" (Isaiah 2:11-12).
There are two reasons (at least) why God hates for man to boast in man.
1) Boasting in man deflects man's attention from the Fountain of his joy and so ruins his life. It tricks man into replacing Magnificence with a mirror. Man was not made to admire man. He was made to admire God. The joy of admiration is prostituted and ruined when man tries to find galaxy-size Glory in the glow of his own reflection. God does not like the damage done by boasting in man.
2) The other reason God hates for man to boast in man is this: It conveys the conviction that man is more admirable than God. Now that is, of course, untrue. But we would miss the point if we said: "God hates lying and therefore God hates boasting in man because it conveys a lie." No. That's not quite right. What God hates is the dishonoring of God. Lying happens to be one way that he is dishonored as the God of truth. So the real problem with man's boasting in man is that it belittles God.
Boasting in God, on the other hand, does the double opposite: it honors God and gives man the joy for which he was made: admiring the infinitely admirable.
Mercifully, therefore, God has doubly excluded boasting by the way he saves sinners.
First, boasting is excluded by faith. Romans 3:27, "Then what becomes of our boasting? It is excluded. By what kind of law? By a law of works? No, but by the law of faith." Why does faith exclude boasting? The reason is not merely because faith is a gift of God, which it is. But so are all the fruits of the Spirit. Yet they do not all exclude boasting in the same way. Faith is unique among all the acts of the soul. It is the weakest and most helpless and most empty-handed act of the soul. It is all dependence on Another. In a sense, it is an acted non-act.
Let me explain. I mean it is an inclination of the soul to seek help with no expectation that any inclination of the soul is good enough to obtain help, not even the inclination of faith. It is unique among all the acts of the soul. Since it is empty-handed, it is not like a virtue. It looks to the virtue of another. It looks to the strength of another. It looks to the wisdom of another. It is entirely other-directed and other-dependent. Therefore, it can't boast in itself, for it can't even look at itself. It is the kind of thing that in a sense has no "self." As soon as the unique act of the soul exists it is attached to another from whom it gets all its reality.
Second, boasting is excluded by election. 1 Corinthians 1:27-29, "God chose what is foolish in the world to shame the wise; God chose what is weak in the world to shame the strong; God chose what is low and despised in the world, even things that are not, to bring to nothing things that are, so that no human being might boast in the presence of God."
God's election is designed to remove boasting. The point is that God does not choose people with a view to any feature in us that would allow us to boast. In fact, Romans 9:11 makes clear that God's election is designed to make God's saving purpose rest finally on God alone, not any act of the human soul. "Though [Jacob and Esau] were not yet born and had done nothing either good or bad - in order that God's purpose of election might continue, not because of works but because of him who calls [God chose Jacob not Esau]". The contrast with works here is not faith, but "him who calls." The choice of God rests finally on God alone. He decides who will believe and undeservingly be saved.
Therefore, let us look away from ourselves and all human help. Let all boasting in man and man's accomplishments cease. And let us boast in the Lord.