If LLM-generated code isn't considered a derivative work of the original, then whether the author was licensed to use the code doesn't matter. But I'm sure the courts will rule in favor of your view regardless. Laundering GPL is in corps' interest and laundering their code is not.
I'm not sure why people are clinging to some fuzzy and stretched out notion of copyright and the GPL in a particular. LLM's do NOT just copy code, with the right prompting, they generate entirely new code which can produce the same results as already existing code - GPLed or not.
If copyright is extended to cover such cases we'll have to become all lawyers and do nothing but sue each other because the fuzziness of it will make it impossible to reject any case, no matter how frivolous or irrelevant.
If I use metallica samples to make a rendition of happy birthday, the copyright holders of happy birthday aren't suing me for the damages to metallica from my use of their samples; the question of whether my use of the samples is transformative is simply irrelevant to the question at hand.
My point was: sampling was widely used by a large subculture (hiphop) just like ai is widely used by programmers. Then a few landmark legal cases changed things entirely. The Verve never saw a cent from Bittersweet Symphony - they wrote a song using something normal to them, and then the law came and knocked their teeth in.
No garaurantees that doesn’t happen with AI in the next few years.