Stephen W. Porges said this quote

Playing nice comes naturally when our neuroception detects safety and promotes physiological states that support social behavior. However, pro-social behavior will not occur when our neuroception misreads the environmental cues and triggers physiological states that support defensive strategies. After all, playing nice is not appropriate or adaptive behavior in dangerous or life-threatening situations. In these situations, humans - like other mammals - react with more primitive neurobiological defense systems. To create relationships, humans must subdue these defensive reactions to engage, attach, and form lasting social bonds. Humans have adaptive neurobehavioral systems for both pro-social and defensive behaviors.