The code of the warrior has the basic qualities of courage, loyalty and willingness to sacrifice for the larger group, to be connected to something larger than simply the individual.
Human beings are group animals.
Even though individualism is of a huge value for us, it's clear that none of us really can exist by ourselves, that our values were forged in groups, that human beings live in groups, and so one of the values of a warrior is being protective of the group no matter what the group is, or how the group is defined. The principal reason behind this phenomenon is that war represents perhaps the most imitative activity known to man. To the warrior, the necessity of revenge may be self-evident and beyond appeal. At a certain point of history, the idea of not taking revenge arises as a religious idea. It arises in China, in India with the Buddha, and in the Middle East with Christ.