Well it's getting philosophical. Even before AI, I would argue that the vast majority of software was meaningless. Actually the most successful software on Earth is hurting society and the environment, in exchange for profit for a few humans.
I don't know any software engineer who can say "if I was not doing what I do, society would get a little worse".
I console myself that while the products we make are useless and probably even harmful the activity itself just represents the world Geist familiarizing itself with computation and its possibilities and thus growing richer in the process.
In the worst case.. sometimes you learn what's best by experiencing what's not.
Well it's not just software engineers. The majority of people in developed countries work in offices. And when you work in an office, it's highly likely that your work is not fundamentally useful.
You might be right in the end, but the middle of a massive outage probably at least somewhat exacerbated by LLMs, being debugged by (presumably) human software engineers is kind of a weird time to make this point