We are proud of ourselves when we do something that we think is a good and honorable work. Naturally we want to be recognized for the good that we have done. Perhaps we have done a good thing, but if we credit to ourselves as righteousness we give in to the sin of vanity.
Vanity of vanities, says Qoheleth,
vanity of vanities! All things are vanity!
Here is one who has labored with wisdom and knowledge and skill,
and yet to another who has not labored over it,
he must leave property.
This also is vanity and a great misfortune.
For what profit comes to man from all the toil and anxiety of heart
with which he has labored under the sun?
All his days sorrow and grief are his occupation;
even at night his mind is not at rest.
This also is vanity.
The Lord knows the good that we do. Isn’t that enough?