There are usually 4 qualitative motivations for achieving anything in life: fear, desire, duty, and love. Fear is propelled by ignorance, desire originates from the mode of passion. Duty signifies the platform of goodness while love is transcendental.
We are receiving everything that is needed for our sustenance by the causeless mercy of the Supreme Lord and His deputed cosmic managers (or demigods). On the material platform, we have needs and those needs are being fulfilled automatically during our sojourn in this material world. Therefore, it is our duty to express our gratitude by actively participating in the cycle of sacrifice (BG 3.14–15) — offering our food to Lord Krishna (BG 3.13) and partaking in sanctified food (or prasadam). If we are only absorbed in sense gratification without acknowledging the source of our gifts, we live a life full of sin (BG 3.16).
It is noteworthy that duties are particularly prescribed for those who have material needs or something to obtain from this material world for their sense gratification.
However (tv), for (tasya) a person (mānavaḥ) who (yas) takes pleasure in the self alone (ātma-ratir eva), self-content (ātma-tṛptaś ca), and (ca) satisfied (santuṣṭas) in the self alone (ātmany eva), there is no duty (kāryaṁ na vidyate). (BG 3.17) For that person (tasya) there is no reason to act (naiva kṛtenārtho), no reason not to carry out the duties (nākṛteneha ) under any circumstance (kaścana) and no reason for him/her to depend on (vyapāśrayaḥ) any being (na cāsya sarva-bhūteṣu) to achieve any purpose (kaścid artha). (BG 3.18)
In other words, for self-realized souls (or those who are satisfied within regardless of circumstances), there is no duty — they have nothing to obtain for their own sake, no purpose in exploiting others, and no reason not to carry out their duties either. They are operating from the platform of love or transcendence.
Lord Krishna concludes in BG 3.19 that we should always do what ought to be done without getting attached to the fruits of our action — this basic karma yoga principle will progressively push us toward the platform of transcendence and enable us to attain the Supreme.