FWIW, many of us who do open source would also find that hypothetical world in which the idea of copyright is abolished rather enticing... but you pretending that is this current world whenever you want to steal our code whilst copyright still paints our interests in using and altering the code from companies that have always been in fear of our community and our licenses (Apple, Microsoft, etc.) as theft is not merely a bit shitty... it is kind of evil/cruel.
And on the first part about AI reading your code or training from it, it does seem like it's legal now, while you as a human reading and porting is not.
It's a bit like Bob Ross' Joy of Painting: if everyone can paint then anyone can make any painting they want to see.
- The freedom to run the program as you wish, for any purpose (freedom 0).
- The freedom to study how the program works, and change it to make it do what you wish (freedom 1). Access to the source code is a precondition for this.
- The freedom to redistribute copies so you can help others (freedom 2).
- The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this.
Note that "preserve licenses" and "preserve attribution" are very much not in that list. Well, the Four Freedoms are what these AI doohickeys enable by being able to in theory reverse engineer or replicate any code, making all code effectively "public", and to bypass any copyright issues around distribution. The fact that AI blowing away the existence of proprietary code also blows away the licenses of FOSS licensed code is a harmless side effect of getting to the Four Freedoms, which was the Free Software goal all along.
If any of this is surprising, then you didn't understand what you signed up for. The AI monkey's paw has curled and you've got what you asked for, sort of.