My colleague Balint recently said this, and I absolutely love this mindset.
Indeed, sometimes you do your best, and it doesn’t work out for the company. Maybe the project is not bringing the money or impact it was supposed to, maybe the business climate had changed. In any case, I’ve seen plenty of projects or even teams and companies that were shut down despite the most earnest and stellar effort from the people involved.
I was a part of such companies myself, and indeed I can still feel awesome about what I did there despite the fact that those companies went bankrupt or simply disappeared.
I think it is important to keep in mind that there always are things outside of our control, and we just have to do our best in hopes that things will work out. And most importantly - we should feel awesome about our work if it is worth it.
And on the other hand - we are still humans, and from time to time we need to work on something fun. Something that will make us feel awesome, even if it is not the most impactful or business critical thing.