Donald Trump always lets his reptilian brain do the talking, and that's probably the key to his appeal. He appeals to the baser instincts, and everybody has them. Group punishment - the punishment of a whole group for the actions of a member - are officially a war crime, which is ironic, since war is itself a group punishment. Humans became the animal world's master cooperators partly to cooperate against other groups of humans, and one factor that welds us into groups is the idea that we as individuals can be punished for the actions of one of our members.
The gangsters who executed 9 year-old Tyshawn Lee were extracting revenge for another murder committed by the gang his father was in. The terrorists who go on murder rampages probably imagine that they are revenging some slights or offenses by members of the groups attacked. Many of them imagine that they are furthering some larger cause - the advancement of their religion, the protection of the unborn, or whatever.
In a world of small groups of hunter-gatherers, destroying or intimidating a rival group can enhance one's own group's chances of survival, and allowing members of ones group to be killed without retribution diminishes the group's chances. The same logic applies to larger groups like clans, tribes, nations, religions and empires.
That's the grim logic behind terrorism - punishing random members of a group for the offenses of its members, and it's also the logic behind Donald Trump's call to kill not just the terrorists, but their families. The couple that shot 32 people in San Bernadino left their infant child with paternal grandmother. By Trump's logic, that child, the parents and siblings ought to be killed in revenge, and maybe some uncles and cousins too. Would that deter future perps? I have no idea, but something like that logic does seem to be in our genes.