A question we often hear is "why do bad things happen to good people?" But of course, any Christian should be able to tell you that there are no good people for bad things to happen to. In all of history, only one good person has ever walked the earth, and the bad things that happened to Him were all for the sake of those who are very much not good.
But there is a question we should be asking: Why do good things happen to bad people? Is it not more fitting for those who sin to immediately receive punishment? Even if we lower our standard of goodness to human levels, surely the "bad" people deserve punishment? The liars, the cheats, the violent, why do these people not get struck by lightning the moment they raise their hands in anger?
The answer to that is because whoever the citizen, the same King rules over all. No man is a bubble, we all inhabit the same planet, watched by the same God. And that God, rich in His mercies, seeks the salvation of all who are made in His image. There is not a single sinner whom God seeks to destroy, but rather, in His goodness, He desires that all should repent and live (Ezekiel 18:32; 33:11; 2 Peter 3:9).
Thus, the reason good things happen to bad people is because of the goodness of He who gives them those good things. We're talking about a God so good that you and I can be forgiven of our sins, though there is nothing good about us, just because He Himself is willing to save us. He asks us to respond in kind. As He is good to us, so also must we be good to others, even if they have wronged us.