God deals with us for the long haul. We learn that from Deuteronomy 8:16, where Moses reminds the children of Israel of God’s dealings with them. He said, speaking of God:
16 …..who fed you in the wilderness with manna, which your fathers did not know, that He might humble you and that He might test you, to do you good in the end—
God has the end in mind when He directs our lives. He could short cut important lessons and take us on a journey that felt good, but He knows that would leave us lacking in the most important ways. It would leave parts of us untouched and unchanged which if left that way would cause us problems and far greater pain than the pain involved in getting those parts of us healthy.
God led the children of Israel through some pain, through the wilderness to make them dependent on Him, humble them and test their trust of Him. If they had not become dependent on Him, remained proud and trusted in something other than Himself, He knew that would take them places that would eventually destroy them. He wanted them to prosper for the long haul and end well. A little pain in the present was well worth the far greater pain it would save them from.
God works in the same way in our lives today. He leads us through wilderness times when there is pain, to save us from far greater pain in the future. He humbles us and tests us to do us good in the end.