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.
[dead]
sad.