We are His children and we will be corrected - in love. It may be firm, but never harsh or cruel. In this case, Job was being showcased by God to the enemy. He was hardly being punished for bad behavior. Comments like the one above are like throwing an anchor to a drowning man in the middle of the ocean.
Many people are uncomfortable around someone going through a difficult time.
Sadness and confusion are not always easy to be around. That is, until you see the smile in the eyes of someone who is glad you took a moment to just be with them and lighten his day for a little while. Do that a few times and your discomfort will quickly be replaced with compassion and hope to give to that person in need of it. And if there is some sin in that person's life or not, they will need a friend who will stick by them. For just as the sufferings of Christ flow over into our lives, so also through Christ our comfort overflows.