Sometimes, God puts you through obstacles because you've been enjoying life too much and you tend to forget to think of him
Sometimes, God puts you through problems because he wants test your faith and see if you would go to him for help.
Sometimes, God gives you troubles because you've done something bad or horrible. So what you do, you will get back, karma right ?
Sometimes, God puts you through difficulties because he loves and cares for you and wants to see how you would deal with all of it.
Maybe Iv been having too much fun and I tend to forget to think of him but he thinks of me all the time ? Maybe this problem im dealing with is a way of God telling me that I've sinned to much and its time to repent ? Maybe he gave me this problem as a warning not to do things which are even more worst ?
But I have faith, I have faith eventually with his help, things will get better. In sya Allah .