That's an extreme, but something like that is possible for anyone working on a sufficiently large project. I get how people like that could really feel like their time was wasted - your assumption is that their contribution will be in the final project in a small but interesting way, and that's not an assumption that can always be made.
There was another independent team in Huntington Beach that wrote the Backup Flight Software. Never used it in 34 years of flights.
Poor bastards ...
An painter spends 18 months creating a great work of art, one of his best. After he is finished, a guy buys it for a large sum of money and promptly burns it. How does the artist feel? Is he going to be motivated to spend another 18 months on his next idea, even though his previous idea was a financial success?
And if the process is pure tedium and you learned nothing about yourself or the tools throughout it, you should try to create the tools that do inspire you to perform the tasks that don't. Manually creating a production build is boring and you rarely learn anything, but creating a good task runner can be incredibly satisfying.
Edit: Another example with something temporary would be spending time making food for someone who consumes it, versus spending time making food for someone who just throws it in the trash.
Out of topic, but in some countries, it's illegal (https://en.wikipedia.org/wiki/Moral_rights)
Those poor nuclear physicists and rocket engineers -- thousands of them -- in the US and the Soviet Union whose ICBMs and nuclear warheads were never used!
In the case of the game industry, you still got paid, but markedly less than a comparable software engineering job outside the game industry and with poor working conditions in general. This is tolerated because you're invested in the work; when that work just gets thrown away, you might as well have been working on the next Facebook for Cats and making the correspondingly at-market/inflated salary.
Not sure if this was the case, but I believe a lot of our developer egos would like us to think that I and ONLY I would be able to do this particular thing (even if you know you'll actually never be THE ONLY one at anything) it definitely feels like you might be one of the very few.
And then when you realize that no, you are not a special snowflake, you kind of feel "my contribution doesn't matter", not in that it doesn't actually matter at all, but in that someone else could've done it as well.
Four years later I was laid off and realised that I had absolutely nothing to show for my years there. No portfolio. Nothing on a public url that I could share.
Landing the next job was extremely difficult.
My resolution was that the next company I worked for should be one that allowed me to point at cool stuff and said, proudly, see that? I built it.
Ownership is very important for your career.
Maybe it's just my own raging ego, but no matter how small my contribution is to the whole, I remain absurdly proud of whatever I did.
I certainly hope that the guys working on AAA games feel the same way to the point of annoying everyone they know: "You see that? You see the way the guard rubs his stubble in his idle animation? Look at how realistically his fingers make contact with his face! I did that, that was me! You're welcome!"