You're writing the code, or producing the documentation, managing the project, performing QA, or whatever else your role is, and in exchange your company is paying you money. That's the bottom line. If you think it's a useless project, then you should be even doubly grateful that a company exists that will pay you your (presumably good) salary to create something useless! I worked on a totally useless project in the past, a lot like some of the comments here describe, and I went into work every day thanking the stars that my company was stupid enough to pay me to do this!
That said, I also never believe anything I do is useful and that also isn’t why I do what I do.
I’m not sure more than 50% of the code I’ve written in about 20 years of this was ever actually used by someone who wasn’t, like, working on the project.
Much of the rest shouldn’t have been written. Total waste, usually easy to see.
A lot more that’s basically just rearranging shit for little reason.
Yeah… very little was useful.
At some point you just have to stop giving a shit. You’ll pay me how much to dig a hole then fill it back up over and over?! Sure thing, how deep do you want it?