I believe that it is done to create some false sense of control of their lives. By self sabotaging when the inevitable bad thing ends up happening they can say, "See, I knew something bad was going to happen!" It's like predicting a falure that they caused giving them some sense of control. This also gives them an false "excuse" to not try to better themselves or try to succeed because, "Bad things are always happening to me so why even try?" Therefore also always making them the victim. It's deep rooted insecurity really.