Job is not here complaining to God about the way he is being treated. This is an argument directed at the friends.
‘We need to consider carefully how we should understand it, when God declares and avows in his law that he will keep the good under his protection, that he will give them their hearts desire that they shall lack nothing, and that they, their cattle and all the goods, shall be blessed; he does not mean that the good will never be troubled. For what need would there then be for patience, and how would it be known that he delivers his servants from trouble? If all things happen according to our preference, we would not know what it was to call upon God and ask him to pity us, neither would we feel his goodness in reaching out his hand to us. So let us note well that God has not promised the faithful such prosperity in this world that they are exempt from all the ordinary troubles to which we must be subject, but all such promises of God require us to understand that ordinarily God will prosper those who walk in his fear … We need to notice two things: that our sins make us unworthy of God’s blessing in all ways and at all times. For there is no one who does not provoke God, not even the most perfect in whom it seems to us there is no fault. For even the righteous find themselves blameworthy before God. Therefore if he chastises them, he does it justly. Secondly, it does not mean that God always measures the afflictions which he sends by the sins that we have committed. He has other reasons for visiting us: namely to mortify the evil that is in us. For God often needs to prevent the vices that lurk in us. Besides this he intends to humble us, so that we do not put our trust in the world. Furthermore he means to know whether we will be obedient to him in adversity as well as in prosperity. And he intends to know the nature of our faith: whether we will flee to him for refuge. In summary he makes us have an eye to the kingdom of heaven so that we know that our welfare is there’ (Calvin – English updated).
‘By this Job shows how it is a great folly to assert in general and without exception, that in so acting God in this present life punishes all those who have offended him, and that as soon as a man has done wrong, God immediately sets it right, and has his hand ready to take vengeance as the party deserves … Remember that Job does not speak against the doctrine of the law, but against the false exposition given by Zophar, who wants God to immediately execute his judgements, so that he leaves no fault undiscovered, and we await no further action’ (Calvin – English updated).
Is God really indifferent? Job is not saying this. He knows that God will judge all law breakers, but he also knows that God is very patient, and is not in any hurry to judge the wicked. This is for two reasons. God in his great mercy is giving them time to examine themselves and his patience is calculated to bring them to repentance. But even if they do not repent, the fact that they have prospered is part of the snare laid for them. The wicked cannot sin without the warning voice of conscience. This is enough warning from God without the need to strew their path with immediate judgments. They are allowed to gain confidence even while they are in a false way, so that in their self-confidence the full extent of human wickedness is made visible.