Just-World phenomenon
The Just-World phenomenon is when people think that because bad things happen to someone, they did something to deserve the bad things. The concept is a lot like Karma, except it is more like a popular superstition instead of a religious belief. The phenomenon also happens in reverse, with good things being deserved.