Purpose and outcome are two very different things.
Purpose can be to love someone, outcome can be to be loved in return;
Purpose can be to express through art, outcome can be recognition and appreciation;
Purpose can be to serve someone, outcome can be a financial reward;
Purpose can be to exert through sport, outcome can be physical fitness;
Purpose can be expressing anger through a fight, outcome can be physical injury;
Purpose can be to support someone, outcome can be a fantastic team.
We choose frustration already when we think that the outcome is our purpose. And may be the Gita tried to give us the manual for living when it preached Karmanye va adhikarastey.
So how does this affect us?
When we set out to do something, if we understand the purpose of why we are doing this, we bring in a focus on the quality of our efforts because our efforts are not diluted by the distraction of outcomes. Outcomes are very distracting because they are the result of our efforts and not the focus of our attention. Results get created, but that is different from creation, which is what we do.
When we focus on creation, on the quality of our efforts, then only are we guaranteed a reward which is the satisfaction of making our efforts. We can be more sure of enjoying our work because we become present, only concerned with our effort. Not being flustered and distracted by outcomes which are a result of so many different actions and karmas.
That brings us to another thing that Gita said, Yogah karma su kaushalam. Yoga is in doing, whatever we are doing, skillfully. Which is really what we do when we focus on the purpose of our action than on the outcome of it.
The quality of our effort has immense impact on the outcome, but should that matter to us? If it does then we have failed in staying true to our purpose.