Yes, non-human code assuming that it does not itself violate any copyright does not earn copyright by itself. However, once combined with human output, the combined work is not exempted from copyright. So the 'no copyright' scenario would be no worse than pulling in code from public domain, the source may not be copyright, but the result after mixing it in would be. You also won't see companies even trying to argue that partial LLM content forfeits copyright for GPL, since the implications for proprietary code would be *far* worse given their near unanimous love of LLM code.
Your second point is the bigger gotcha, that an LLM generated copyright infringement can be a problem while every one actually involved can be genuinely oblivious. Even as an AI company has successfully defended themselves from being liable for infringing output, they essentially throw users under the bus by asserting that while infringement can happen and be facilitated by their models and services, it's the user's liability if that should happen and has nothing to do with their use of material for training and the resultant reality that the model *can* construct infringing copies of material in the training set.
Sadly, the second point is in practice waved away due to the assumption that the corpus of training material is almost entirely open source stuff, and while they do have copyright to respect, in practice they don't expect the open source projects to be resourced enough to detect and litigate infringement. In the "worst case" scenario, remedy is also likely to be easy because the courts will not recognize financial damages and the defendant could probably just LLM up a an alternative invocation, or 'shim' their way to isolate the code if copyleft, or simply credit the plaintiff if it's just BSD/MIT style. Long standing reality that violating open source copyright is "no big deal", only violating closed source copyright carries real risk. Some companies take the open source licenses seriously, but no company that has abused those licenses has faced anything vaguely significant in the way of consequences. I don't think anyone has been forced to copyleft their proprietary code due to a GPL violation by a court, at 'worst' they only have to correct the issue moving forward.