The entire concept of copyleft and free software depended on copyright: it isn't "take my code and do what you will", it is "here is a very explicit contract that demands you credit my work and even requires you to contribute back in return for my efforts". And like, maybe a world with no copyright at all is better! But that isn't the world we are in: it is no more legal for you to have an AI read my code and then port it into your codebase (which could involve training as an intermediate step or could merely involve the AI searching for it and loading it into its context) than would be for you to directly read my code and port it into your codebase or even for you to utilize a deterministic tool to read my code and port it into your codebase; you only get to do those things if you retain my license on the result and abide by its terms.
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.
It depended on copyright as the legal structure to uphold itself, a means to an end, not the end itself. As another comment in this thread nearby says, the point was to support the four fundamental freedoms and ultimately a world without copyright on code at all.
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.
Why do you believe that having an AI read my code and port it into your code base is "legal now"? Let's call that question A. This is a very different question from B whether it is legal to train a model on my code, which is also still a different question from C whether it is legal to use the model you trained on my code to generate code that is in any way similar to my code into your codebase.
As far as I know, A is still illegal, and nothing at all has changed that situation; if it did, it would be shocking, as it essentially undermines the entire legal framework of copyright, and it would be making national news and destroying -- not harming: entirely wiping out -- major software companies.
The only thing I think people have really litigated in the courts is B (as the obvious defendant is the juicy maker of the model rather than the users of the model, whereas they might be able to dodge culpability in C and even A), with the result that it is very likely legal... but, while that might be a bit frustrating, it was never shocking: a model is a highly transformative use case vs. the original code fed into the training.
However... B being legal doesn't actually imply that C is legal -- even if a ton of people fail to appreciate this distinction -- and C is where the war is starting to be fought. Instead of software, I think the most interesting avenue for this to become scary for people assuming this is legal will come from lawsuits involving the music industry (which tended to lead the pro-copyright cause in many of the skirmishes I was involved in while working on device freedom issues).
That said, people really focus too much on C, hoping for that grey area in both the law and in their analogies, when what developers are actually doing now is often A: the model has become an agent that uses tools, has access to the Internet, pulls code off my got repository, and is essentially just running a non-deterministic transform on that data sitting in its context... I have heard nothing that makes it sound as if A is "legal now".
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.