There are three main categories of AI ethical dilemmas for me:
1. IP infringement
2. Climate impact
3. Cultural impact
I think that 2 & 3 apply to all AI right now - artistic, coding, writing, whatever. However, I don't think that #1 applies to everything. Code has been openly shared for as long as it's been possible to do so. There have probably been cases where AI trained on closed-source code, but I hardly believe that was ever necessary at any point to get where we are.
My point in saying this is that your critique of AI is valid but I think a little less so here.
#1 is way more concerning to me