it’s the age old question of nature versus nurture. Psychologists are constantly trying to work out which is the dominant effect and if it determines the choices that we make as adults. unfortunately, i don’t know if there is an answer to this question, but it’s interesting to read reports on it
These kinds of atrocities seem to be an unfortunate feature of human nature, like an extreme example of not really caring about the results of your actions, dehumanising victims.
Hannah Arendt has some interesting and disturbing works on this – she spoke to some war criminals and described them as completely normal, mediocre even. There was nothing much different about them from you or me. Later experiments like the Stanford prison experiment have shown this, too. In that experiment they got two groups of normal students, one taking the role of prisoners, the other group taking the role of prison guards. By the end of it the guards were being really brutal to the prisoners.