Although we deal with probabilities and expectations, the actual results can deviate substantially from such expectations, particularly on a short-term basis.
William James once made an acute point about the relationship between happiness and expectation. He argued that satisfaction with ourselves does not require us to succeed in every endeavour. We are not always humiliated by failing; we are humiliated only if we first invest our pride and sense of worth in a given achievement and then do not reach it.
I never had one hour's happiness in her society, and yet my mind all round the four-and-twenty hours was harping on the happiness of having her with me unto death.
The fourth (of the four cardinal virtues) is supportiveness: this manifests as service to others without expectation of reward. (Paraphrased: Such service is not a mere conforming to some external rule of behavior, but instead a manifestation of your original nature).
We fight for lost causes because we know that our defeat and dismay may be the preface to our successors' victory, though that victory itself will be temporary; we fight rather to keep something alive than in the expectation that anything will triumph.