In poetic language God plies Job with further unanswerable questions. As Barnes says, the language is not to be understood literally.
We have enough evidence of God’s skill for it to be unreasonable to doubt his attention to all the details of his creation. There are aspects of Job’s case that even he does not understand. He is not in a position to design a training program for himself. Our hearts are made by God and are fully understood by him alone. If we start to distrust him the moment we do not understand what he is doing with us, we act as if we knew better than he does. God measures out pain, blessing, light and dark, according to his knowledge of the way he must deal with us. It is not as Job’s friends crudely imagine: that pain is for wickedness, blessing for right behaviour. No, all these things come from God according to his Fatherly care.