The robots in WALL-E are no different. They might call it a "directive" instead of a "duty" but they mean the same thing. However, in WALL-E, the 'bots find out that sometimes there are things more important than what you've just been programmed to do.
Questions About Duty
What is each robot's directive, and how do they end up defying it?
Do all robots defy their directive? Which robots don't, and what are their fates?
What are the humans "programmed" to do? Which ones end up going against those directives and doing something different? What do they do? How do they end up changing things?
Do human beings have a duty to protect the planet? If they've failed once, should they even be given a second chance?
Chew on This
WALL-E ends up doing his duty, even though he has to seemingly abandon his post to do it. His job is to clean up Earth, and he ends up bringing humanity back to clean it up by the end of the film.
The Captain takes charge even after he's off the Axiom, teaching people how to farm and grow food—even if they can't grow that coveted pizza plant.