Also there may be a genetic reason why human beings are both altruistic (to those deemed to be within group) and savage (to those outside the group). This approach helped our species survive.
It's kinda hard-wired into our DNA to do this, and religion is a manifestation of this evolutionary quirk.
More here if you want