Here is one of Job’s friends who tries to diplomatically tell him that he is suffering all of these calamities because he has offended God. You can see that argument starting to form in vs.7 when he asks the question, has the innocent ever perished, or the upright cut off? He goes on to state that in his experience those who sow trouble will reap trouble. So, Job, you have sown trouble even if you don’t think so.
Jesus has a response to this in Matthew 5:45 when he states that the rain falls on the just and the unjust and the sun rises on the righteous and the evil. This goes very much against what Job’s friends tell him, but does fit well into our theological framework that we serve a God who is righteous and just, but does not punish and does not reward. He simply tries to ensure that His kingdom comes here on this earth.
Now, he is correct in what he states in vs.17 that mortals, humans, cannot be righteous before God, nor can we be pure. But this does not cause God to crush us like moths or to be destroyed from one moment to the next. That is a fairly capricious and evil God in my sight. You might enjoy, or not, reading a classic from 1741 where we have Jonathan Edwards preaching on “Sinners in the hands of an angry God.” Enjoy!