Just-world phenomenon

The just-world phenomenon, also called the just-world theory, just-world fallacy, just-world effect, or just-world hypothesis, refers to the tendency for people to want to believe that the world is fundamentally just so when they witness an otherwise inexplicable injustice they will rationalize it by searching for things that the victim might have done to deserve it. This deflects their anxiety, and lets them continue to believe the world is a just place, but often at the expense of blaming victims for things that were not, objectively, their fault.

Another theory entails the need to protect one's own sense of invulnerability. This inspires people to believe that rape, for example, only happens to those who deserve or provoke the assault. This is a way of feeling safer. If the potential victim avoids the behaviors of the past victims then they themselves will remain safe and feel less vulnerable.

Scientific studies
Two studies gave women what appeared to be painful electric shocks while working on a difficult memory problem. More women of broadly the same age and social group who observed the experiment appeared to blame the victim for her fate, praised the experiment, and rated her as being less physically attractive than did those who had seen her but not the experiment.

In another study, female and male subjects were told two versions of a story about an interaction between a woman and a man. Both variations were exactly the same, except at the very end the man raped the woman in one and in the other he proposed marriage. In both conditions, both female and male subjects viewed the woman's (identical) actions as inevitably leading to the (very different) results.

The just-world phenomenon was first theorized by Melvin J. Lerner.

In literature
Historically, this concept can be dated back to the theodicy of Gottfried Leibniz, a theory that was attacked by Voltaire in his novel Candide.

The concept is made use of in Robert Browning's 1855 poem Childe Roland to the Dark Tower Came: One stiff blind horse, his every bone a-stare, Stood stupified, however he came there: Thrust out past service from the devil's stud! Alive? he might be dead for aught I know, With that red gaunt and colloped neck a-strain, And shut eyes underneath the rusty mane; Seldom went such grotesqueness with such woe; I never saw a brute I hated so; He must be wicked to deserve such pain.