I recommend for any folks interested into the psychology of it , to see the TED TALKS video of Philip Zimbardo , a psychologist who's research shed light into this very question.
but basically, just as other forum members have suggested i believe neither. We may have evolutionary adaptations for self preservation but it all comes down to consciously deciding the next step in the choice of action, good or bad.