In Arabic, we have the concept 'ahlak' which is often translated into english as 'moral', but in fact they are not the same, and so following the principle of exegetical neutrality, I shall simply use 'moral' and 'morality'. Please note 'ahlak' means something close to the human instinct for values whether they're are right or wrong, good or bad so it differs from altruism. It is about your expectations for others or your innate attitudes. So in this vein, 'ahlak' is a property of agents and roughly encompasses how values impact the community.
So, what does contemporary philosophy say about the purpose of moral values in the context of community?