It's because, at least in the US, AI generated code cannot be protected by copyright.
<https://www.copyright.gov/ai/>
<https://www.copyright.gov/ai/Copyright-and-Artificial-Intell...>
The Office concludes that, given current generally available technology, prompts alone do not provide sufficient human control to make users of an AI system the authors of the output.
I'm not a lawyer either but if/when something like this goes to court the conclusion of the US Copyright Office is probably going to play a part.