Who gives you troubles and pain?
None inflict pain on us!
There is a wrong belief that God is like a dictator, who inflicts pain and trouble to human beings. Remember first of all "god is not a sadist' who enjoys the discomfitures of human being. More than any body else, God loves each and every one of us. This is the reason for his concern about our spiritual welfare. Whenever we pray god, we do so for the sake of petty things like money, properties, health, comforts, happiness, for marriage, for promotion, for progeny and what not. All the above are purely ephemeral in nature. Till you earn, you will be hankering for money.Once you get a decent job, you will hanker for a pay rise or promotion. Once you get, you would like to get married, beget children, construct a house, own a car etc. etc. Hence there is no end to our wish list from god. Initially god accedes to the request of man for the mundane things.
When you have settled in life comfortably, there will be a 'deep discontent' in spite of achieving all the necessities of life. This is known as 'Divine discontent'. God has purposely given discontent to human beings so that he will hanker for real happiness. Every one of us are aware of the impermanent nature of earthly pleasures and achievements. Creation is sustained by dualities. In this dual world, pain and pleasure are alternating in every one's life. Without the scorching heat of the summer, one will not hanker for shades or cool showers. People living in cold climates like Newzeland and other such places seek warm climate. People who are living in arid climate hanker for cool climate or at least rain. This is the paradox of life. But, one has to go beyond this dualities in order to escape from constant agitations and troubles. We must learn from our troubles and pain and hence these are essentials for the evolution of human beings. When god has created the universe, he has introduced the correction mechanisms so that man do not degenerate to animal level. Grief and troubles are actually retribution to our past misdeeds. But god never reveal 'for what particular sin, man is suffering? God allows suffering because of the love he has for humanity. If your children become bad, will you be happy or sad? No parent in this world tolerate evil in their children. They use many kinds of punishment to correct the ways of the children. God too utilize these grief, pain and trouble to correct his children.
In Bible, there is a story to illustrate this point. A father is having two children. One boy obeys his father, assists him in all his cores and serves him in all possible ways. The other boy is a vagabond who has developed lot of bad habits by moving with bad boys. One day, the bad boy leaves the home and the father is really perturbed. He was praying every day for the safe return of his prodigal son. Why he is worried about the bad son? Why he never appreciate the good son? This is how love is expressed. The father knew well that the first son is perfect in all respects and he has no worry about his welfare but he was always thinking about the welfare of the stranded boy. God too awaits for all those who have taken to bad ways. He awaits day and night for the return of the prodigal son. Once he returns, he was welcomed with lot of celebrations. Yes, god awaits the return of all the prodigal sons back in his fold! Hence these sufferings and troubles are only for correcting the erring child. There is no bad motive in god. He loves all but expresses his love more to the stranded children! Hence it is our own bad deeds in the past births returns to us in this birth as problems, troubles and pain!