Because they turned back from him, and would not consider any of his ways:
Elihu here addresses himself more directly to Job. He had spoken to the rest (Job 34:10) as men of understanding; now, speaking to Job; he puts an if upon his understanding: If thou hast understanding, hear this and observe it, Job 34:16. I. Hear this, That God is not to be quarrelled with for any thing that he does.
Commenting on Job 34:16-30
When he giveth quietness, who then can make trouble?.... Quietness or peace is of God; external peace to bodies of men, to communities, civil and religious, and to particular persons; quietness and contentment in outward enjoyments, peace and safety at home, and from enemies abroad; inward spiritual peace, this is of God, is in Christ, and from him; is the fruit of his righteousness, spoke...
The grounds of their punishment in Job 34:26. Job 34:28 states in what respect they "considered not God's ways," namely, by oppression, whereby "they caused the cry," &c.