Do we only thank God for what He does or for who He is?
“I will give to the Lord the thanks due to His righteousness.” -Psalm 7:17
It is natural and right to thank God for the good He has done for us. His actions on behalf of His people are worthy of our gratefulness.
Here, though, the Psalmist is not giving thanks to God for His action, but for His character. David praises God not because of the righteous things God has done, but because He is, in Himself, inherently righteous.
Why is this such a source of thanksgiving for David? Simple. We can rejoice over God’s actions for us in the past and feel fine for a moment, but we thank God for His righteousness because His character is where we find assurance that He will act for us in the future.