It is probably a mix of both. The underlying biology leaves the individual more at risk of adverse experiences leading them towards criminality.
Ultimately though, we are all responsible for our own actions. A great many people in this world have suffered neglect, violence, abuse, and more, and the enormous vast majority do NOT end up committing crimes like this. Though we can see in these things reasons and though we can seek to avoid history's repeat, (by providing proper treatment and support for those who have been victims of adverse childhood experiences to prevent them eventually moving towards criminality) nothing that has happened to anyone can justify or mitigate them committing a crime like this.