Deuteronomy 8:5

You should know in your heart that as a man chastens his son, so the LORD your God chastens you.