Macid's right. There's good and bad inside every human, but one must not dwell on their innate evils, that's what weakens us and makes us the bad guy. If there's good, there's evil; it's the basic scheme of things we all have to put up with. I myself have lived through exactly what you're speaking of; my mother divorced my father to try and raid his monetary reserves, and in the process, she stepped on everyone just to try and get it. Me, my little siblings, my father, my Dad's parents, and hell, even her own Mom. Lots of miserable things happened, sides of me I never knew about came forward; I did things I regret thoroughly and wonder what point there was in doing.
In the end, I had succumb to my own inner demons. When I realized what was happening, I was appalled. I came to realize that there is no point in acting so much on revenge, nor is there any reason to let these parts of me I dislike so become my outward action. I saw I was hurting myself and my chances rather than helping the rest of my family. For a while after, I was searching for who I used to be. It was a fruitless venture. I could never find myself from before the outbreak of my own evils. I felt lost, confused; I had no idea who I was, in all honesty.
But about two or three years ago, I learned something. Don't dwell. Move forward, not backward. The past has passed and there's nothing we can do to change our actions from the past; we can only change our future. So best to strive to be the best person you can be so the future is bright, rather than fear the dark.
None of this is accusation in any way, rather, it's proof that even those who have proven to have ill will can change. Their future is in their hands, but can be changed by others if they let it. This can be either for better or for worse, but no matter what, if one tries to fight their inner demons, they will prevail in the end. It's all about patience and diligence.
Now, why people act on bad impulses could be one of many things. Peer Pressure, opportunity, vanity, long held dreams lain before them, weakness, disorders, and whatever else may fit. There's more than a million possibilities as to why, so there is no one answer. But two categories could be in place; it could be them having succumb to their inner demons, or it could be some outside influence. The tree splits infinitely. Some people act badly on purpose, for wanting to cause chaos or pain. Others act badly because of some uncontrollable factor or a pitiable one. You never know.
Point and case, there's hundreds upon thousands of reasons someone could do something like that. But either they are punished fully for their mistake, or they try their best to rectify it for a better future. One should always aim for the latter.