It was good for me to be afflicted, that I might learn Your statutes.
This psalm pursues two chief ends: to exhort God's children toward a holy life, and to establish the Law as the rule and form of true worship. The psalmist weaves in promises to animate believers to live justly, and complaints against the wicked who despise the Law, lest the faithful be corrupted by their example. Though he moves from one matter to another, the composition is not a heap of scattered thoughts, but holds together by a living connection.
AI summary
Commenting on Psalm 119:1-176
See here, 1. That it has been the lot of the best saints to be afflicted. The proud and the wicked lived in pomp and pleasure, while David, though he kept close to God and his duty, was still in affliction. Waters of a full cup are wrung out to God's people, Psa 73:10. 2. That it has been the advantage of God's people to be afflicted.
I know, O Lord, that thy judgments are right,.... His word, the doctrines and precepts of it, they are all consistent with the holiness and righteousness of God; and so are his judgments on wicked men, they are righteous, just, and true: God is righteous in all his ways, there is no unrighteousness in any dispensation of his; and such are his corrections of his...