The meerkat is not performing any sort of social "duty". That's a projected motive on our part. The more skittish-vigilant meerkats survived to spread their skittishness and habitual vigilance to their offspring. And now they are all that way. They are neither aware of it nor are they choosing it.
They're as aware of it through instinct, just as we humans are aware of a lot of things through instinct ─ why in certain circumstances we fear the dark, get the creeps, hair 'stand on end' and so on. Why we had bugles and drums to march into old battles, encouraging the group response. We're an animal first, with a bit more space than is usual left over for intellect.
And morality did not develop from this kind of evolutionary process because morality requires imagination to offer us a choice to compare and contrast, and the ability to create a value hierarchy with which to assess the options. Both traits that we humans appear to have had since the dawn of recorded human history. Before words there were images, and imagery requires imagination.
Of course morality is evolved. We behave one way in our own group, and outside that group we behave in other ways, whether the group be family, sports team, place of employment, and so on. And the examples of evolved morality that I gave you are the result of research ─ I outlined one such experiment
>here<. If (as I trust is the case) you'd like to know more, I'd suggest Mariano Sigman's book
The Secret Life of the Mind (2017) is a very readable place to start. And on first principles as an intelligent and informed human you should keep up to date with the science, both of this kind and more generally ─
Science Daily is a useful and reputable site for the layman like me, for example; and there are others out there.
Once the brain can imagine options, establishing a value hierarchy soon follows. Which option is better than which? And better for me or better for us? Now we are establishing conceptual morality.
Chimps, dolphins, mice, birds, goodness knows how many other critters, can imagine options, can usefully apply trial and error, can devise new ideas ─ I mentioned in a post recently that dolphins have a learnt cooperative behavior for herding schools of fish into the shallows for easier catching, for example. And a few years back there was an article about Australian cockatoos in urban areas where one of them had worked out a procedure to lift the large plastic lid of garbage containers to get at anything edible inside (throwing a lot of garbage out in the process); and how the discovery was quickly copied by neighboring flocks of cockatoos, to the general chagrin of the suburbanites.
Obviously humans are better at being humans than any other species; but we've been so recklessly successful that now we're having to clean our own house. But we're simply a more expensive model of mammal, part of the natural world, not above it like we used to think. Nor would we be the first species to wipe itself out by consuming everything in sight till there was nothing left. We need to smarten up, look after each other, and the health of the planet as a whole, with its millions of species, probably many billions if we count the microorganisms that keep our bodies alive, grow the plants, and so on.