First, we might want to be cautious about demanding that we get what we deserve. I the Lord test the mind and search the heart, to give to all according to their ways. If we think that all of our thoughts, words and deeds merit God's unqualified approval and reward, we're only fooling ourselves. Only God knows what is in anyone's mind and heart. Bad things happen to good people.
Good things happen to bad people.
Deal with it. There may not be a direct, unbroken connection between our behavior and what bad or good things happen to us. Maybe you saw the heartbreaking pictures and essay on AIDS in Africa, this week in Time Magazine. Infected by this disease, women and children in particular are sometimes driven out of their house, disowned by their extended family, beaten and tormented by the community. They're labeled bad, loose, cursed.