A duty is an obligation, and this may be moral or it may be legal. A jury has a duty to consider all of the facts involved before deciding the fate of someone who is on trial. A police officer has a duty to protect and serve the public. Those who shirk their duty are viewed as unreliable and untrustworthy, and this is not how you want to be seen. Everyone has a moral duty to be honest and to help others when possible.
It is the duty of Her Majesty's government neither to flap nor to falter
Do the duty which lieth nearest to thee! Thy second duty will already have become clearer
Our blunders mostly come from letting our wishes interpret our duties