Indeed. It should be the goal of society to automate away as much work as possible. If there are perverse incentives working against this then we should correct them.
1. How do you define work differently from "that which should be automated"?
2. While I agree with your stance, it is not by itself sufficient. If you provide the automation but you do not correct the perverse incentives (or you worry about correcting them only later) that you mention, then you are contributing to widening the disparity between a category of workers (who have now lost their leverage) and those with assets and capital (who have a reduced need for workers).
I agree, the fact we're even talking about this is evidence that our society has the perverse incentive baked in and we should be aware of and seek to address that.
Regardless, programmers would be hypocritical to decry having their jobs automated away.
That's why it's best to get unions or support systems (like UBI) before they're needed. It's hard to organize and build systems when you have no leverage, influence, or power left.
What do you mean by "bad"? If you're asking why it makes sense to structure society with an eye toward avoiding disparity, then it's enough to just observe empirically that people have an aversion to unfair treatment. And not just people: https://en.wikipedia.org/wiki/Social_inequity_aversion
If you're asking why do people respond the way they do to disparity, then I can only speculate that it has something to do with the meaning of life.
Human beings need something to do to have a fulfilling life. I do not agree at all that the ultimate goal of society is to automate everything that’s possible. I think that will be horrible overall for society.