"Happy the one whom God reproves! The Almighty’s discipline do not reject. For he wounds, but he binds up; he strikes, but his hands give healing." — JOB 5:17-18
Many people struggle with the idea of whether God punishes or not. This translation uses the word reprove, and I think to punish is a different thing altogether. I think of punishment more as a physical act. And of course we're not saying that God is up in the clouds waiting for us to mess up so He can start throwing thunderbolts down at us.