We humans are thought to be an intelligent species which has the best of brain enabling us to perceive things like none other. Gradually through evolution we have developed sense of "giving" something to our loved ones. And, we do not stop there, we not only have this "give away something" for our loved ones but also many of us are philanthropic and give away to unknowns.
Charity, donations are good part of modern day world despite the inter-human competition getting bigger. I do not mean it is "only a modern" phenomenon but I mean even in today's world of cut-throat competition, there are good stories of people donating their money and resources to the needy. Its our relationship of a very different kind, where a feeling of pleasure emerges from inside and directs us to help others who we don't even know.
A person ready to sacrifice his / her life for the cause of his / her society is understandable but there can be incidents where someone does this for totally unknowns. However, such incidents are rare and general attitude of a common person is being selfish.
Even a terrorist who has been brainwashed into doing "anything" for a "cause" might get into the act of laying his life. He may be doing a foolish act which is in fact against civilization but in his understanding he does it for "his" people's cause.
The sacrifice for the cause of one's own people is not limited to humans and their are examples from animal world which tell us that this characteristic is prevalent in as mundane a species as an aunt! The Brazilian ant Forelius pusillus is one of that kind. The ants need to seal off the entrances of their nest with sand after sunset and in order to do that, some of them have to remain outside to complete the job. Scientists have found out that they do this willingly. They sacrifice their lives for their society !