Reciprocal altruism (Trivers, 1971) provides the answer. Because of reciprocal altruism, we are all better off in the long run if we help one another. If helping someone now increases the chances that you will be helped later, then your overall chances of survival are increased.
Essentially: Teamwork will increase your chances of survival