It does when you produce the code verbatim, as happens frequently.
Betcha I’ve spontaneously produced code that’s been written before. Who do I owe royalties to?
You're not a computer whose sole purpose is to regurgitate code verbatim at massive scale when requested, unlike an LLM designed for exactly that purpose.
Except LLMs aren't exactly optimized for verbatim regurgitation.
under what system of law?! -- there are at least four major economies in the world, and they all have different rules about these intermingled issues.