Life carries no perfection for any of us. God gave us a perfect place, the garden, and we blew it. Then He promised to deliver us (the Hebrews, the believers in Him) to a place where we would not get sick, and all would be blessed, and things would be good. All He asked of us is that we follow the rules He gave us. That we be faithful to Him, as He is faithful to us.
In trying to help us keep our focus on Him, God allows events in our lives to happen, good and bad. All for the purpose of teaching. Many times, when bad things happen, we cry out why me rather than Thank You (remember, in all things give thanks to the Lord). And when good things happen, we take full credit for it, as if we created the situation and the solution all by our lonesome selves. To keep us in check, God allows life to have difficult turns to humble us. To help us remember that all things are by Him and through Him and for Him, we are just sharers in the wealth, the blessings.