Many of these people are heavily traumatized. Charles Manson for example was mistreated by his mother and in prison. If there were better child protective services and a more humane prison system in place, he might never have done what he did.
Most people doing evil things are in part doing these evil things as a result of their circumstances. By changing their circumstances through social programs you reduce violence and make everyone happier as a result.
You can argue that blaming violence on circumstances ignores people's own responsibility, but I believe that better social and medical programs are still worth it because they attack the part of the root cause society can influence most easily.