Honestly, programmers don't decide either. We build what we are told to build.
> Could it be made better? Of course! Most of it is terrible. There's an infinite amount of work to be done.
Of course, if our objective it to achieve perfection, then there will always be more things to do because we can never achieve perfection. But most of the time "good enough" is good enough.
But I agree with that AI won't be taking programming jobs anytime soon. But AI will certainly put pressure on the number of jobs and wages. As you said, "smart" compilers, debuggers, code analyzer, etc helps increase productivity. But sooner or later, it will eventually hit demand for programmers.
We are living in the golden age of tech. So it's hard to imagine it ever stopping. I think the biggest concern is the wages and prospects. As more and more people get into programming and as the profession gets more and more productive ( AI, tools ), it's inevitable that wages will stall and decline. Hopefully, just not in my lifetime.
Like many other skilled occupations in this country the future is probably going to be very highly paid elite workers and masses of low paid people who are just "good". Kind of inevitable in a capitalist society where human labor is losing its value.
If only. If the people doing that telling could elucidate clearly enough what it was that they wanted built, they'd be programmers (or, to be fair, requirements gurus - I have worked in a company that had someone really, really good with requirements; it was the only place I've ever worked in which the customer never reported a single bug).
Anyway, it's not like there's a limited amount of programming to be done, and if we could only be more productive, we'd finish it all up sooner and go to the lake. No, the demand for more and better software will only increase to consume any productivity increases we achieve. Think about the software you use every day. Could it be made better? Of course! Most of it is terrible. There's an infinite amount of work to be done.