… because it helps survival of the species. It looks irrational in individual level, but makes sense in higher level. This dilemma of locally optimal vs holistic optimal is well known – see Deming’s The New Economics pg 82-87 for an example on how local optimized departments has poorer result to the company. The question of rationality depends on perspective.

There is a Chinese saying, 人人为我,我为人人. Strong sense of (global) community helps survival of the (global) community. If not, selection of sub-group will intensify when changes of the environment become abrupt enough.

Cancer, e.g., occurs when individual cells in the body mutate and develop the ability to proliferate without the restraints normally in place that serve the interests of the individual organism.

from Wikipedia. There is always a conflict, the question is how to balance it. This is also an idea of Multilevel Selection Theory.