David composed this psalm in difficult circumstances, when the contempt of those around him was added to all the afflictions he had already endured. And it was precisely then that praise poured out from David's heart.
Often, after receiving from the Lord everything we asked for and even more, we become ungrateful and begin to forget from whom we received it all. At the height of his earthly power, David too did not escape sin. Yet in years of hardship and trial—not only when he had to oppose his enemies with weapons, but also when daily and constant humiliations wore him down—he remained with the Lord.
Apparently, in those days it was revealed to the psalmist that it is not the Lord who will punish the sinner: his own evil will kill him. What the one walking the path of evil has sown will return to him. The righteous, however, has many afflictions, but it is precisely for this reason that the Lord will deliver him from them.
To praise the Lord at every time and in all circumstances—this is the important lesson David learned during his wanderings and bequeathed to us.
