John Tierney has written an evocative NYTimes article on the notion of fair, unselfish behavior toward strangers. Treating others justly and responsibly if a universal precept among the world's major religions and cultures, each with its variant on the golden rule (do unto others as you would have them do unto you), and each with a common goal -- to estabish and preserve order, and to resolve conflicts.
Philosophers, animal behaviorists and evolutionary biologists have all examined selfless, altruistic behavior, and its genesis in both the natural world and human society. At its most fundamental, occurring among many species, altruism appears to present distinct advantages to those who practice it. One advantage is genetic. Within a family if you do something which offers you no direct gain, but which furthers the survival of someone related to you (hence someone who shares a portion of your genes), you are enhancing the possibility that those shared genes will be passed on to future generations, an effect known as kin selection. Among birds, mammals and insects, we find individuals caring for the offspring of their own parents, even at the expense of producing their own young. Think jays, wolves, bees, among many others.
Another advantage is collective or tribal -- it is referred to as reciprocity -- cooperative or altruistic behavior which may lead to future mutual interactions. At this more advanced stage of organization, one might find agreements between clans or between nations which provide some form of benefit for both parties.
At a theoretical, meta level, as discussed in philosophy, altruism becomes a bit more murky. One can argue that if I do something positive for you, at some energy or material expense to myself, there has to be some other benefit to me -- perhaps an apparently altruistic act allows me to feel virtuous or otherwise better about myself, enhancing my self-image (not to mention my image in the eyes of others).
So is there truly such a thing as pure altruism? A parent protecting his/her child is, in a real sense, protecting a huge genetic and material investment. The proverbial Boy Scout helping an aging woman across the street, is earning the admiration of adult society. Why does a soldier fall upon a live hand grenade, sacrificing his own life to save the lives of his buddies? Why do the wealthy make hefty, charitable donations to causes such as the arts, humane charities, or disaster relief?