God disciplines people.
We have previously established that GOD loves us and that this form of love means that He desires what is best for us, to see us prosper.
We have also established that GOD hates sin. Sin separates the sinner from GOD, relationally.
Because GOD loves us, it hurts Him to see us separated from Him. It is best for us to be with GOD, relationally—and in every other way.
Because GOD wants what is best for us, and what is best for us is to be with Him, He is willing to do what it takes to give us every opportunity to correct our ways. When we go astray in our choices and behavior, GOD disciplines us with the intention of causing us to correct our behavior so that our relationship with Him can be healthy.
GOD's discipline is meant not out of mean-spiritedness, but for our good.
GOD told Israel that He allowed them to suffer in the exodus and wilderness journey because He was testing and disciplining them:
1 “Every commandment I command you today you must be careful to do, that you may live and multiply, and go in and inherit the land the Lord swore to your fathers. 2 Now you shall remember the whole way the Lord your God led you in the desert, to deal harshly with you and test you, to know what was in your heart, whether you would keep His commandments or not. 3 So He dealt harshly with you and weakened you with hunger, and fed you with manna, which your fathers did not know, that He might make you know that man shall not live by bread alone, but by every word proceeding from the mouth of God man shall live. 4 Your garments did not wear out on you, nor did your feet become callused these forty years. 5 You should know in your heart that as a man chastens his son, so the Lord your God chastens you. 6 Therefore, you shall keep the commandments of the Lord your God to walk in His ways and to fear Him.
(Deuteronomy 8:1-6 OSB)
Later, during the first century, the writer of Hebrews instructed his readers:
4 You have not yet resisted to the point of shedding blood in your striving against sin; 5 and you have forgotten the exhortation which is addressed to you as sons,
“My son, do not regard lightly the discipline of the Lord,
Nor faint when you are punished by Him;
6 For whom the Lord loves He disciplines,
And He punishes every son whom He accepts.”
7 It is for discipline that you endure; God deals with you as with sons; for what son is there whom his father does not discipline? 8 But if you are without discipline, of which all have become partakers, then you are illegitimate children and not sons. 9 Furthermore, we had earthly fathers to discipline us, and we respected them; shall we not much more be subject to the Father of spirits, and live? 10 For they disciplined us for a short time as seemed best to them, but He disciplines us for our good, so that we may share His holiness. 11 For the moment, all discipline seems not to be pleasant, but painful; yet to those who have been trained by it, afterward it yields the peaceful fruit of righteousness.
(Hebrews 12:4-11 NASB)
GOD simply loves us too much to not correct us when we need it.
And what adult is there who does not look back with deep appreciation for the past painful discipline they received at the hands of a father who they knew loved them.