Why not?
If your implementation is serving back literal chunks of code, I'd presume not, and they can easily use copyright laws to punish you.
If your implementation uses that as "inspiration", It's hardly different from you reading that code and learning from it. Obviously, it's almost impossible to read the code, learn from it, and be 100% sure you'll never reproduce any of their code. Hence "clean room" teams and such.
>Section 102 of the U.S Copyright Act sets forth what is and what is not subject to copyright protection.[3] The first part of the statute states the eight types of works which are subject to copyright protection such as; literary works, musical works, dramatic works, pantomimes and choreographic works, pictorial, graphic, and sculptural works, audiovisual works, sound recordings; and architectural works.[4] The second part of the statute states that copyright protection does not “extend to any idea, procedure, process, system, method of operation, concept, principle, or discovery…”[5] https://easlerlaw.com/software-computer-code-copyrighted
Which is why we have software patents in the first place.
From my limited knowledge, it looks like it is just regurgitating. This is based on what I have heard about outputs, i.e. stays the same if rand function is fixed.
Also with code there are finite ways to create something functional as opposed to an opinion paper where there are a range of viewpoints and how to express those viewpoints.
You can make this argument for any artist. We study whole art movements which are periods of time where all art looks the same. Somehow, we want code production to be completely novel with no prior inspiration?
To your second point. I agree. There is limited expressivity in code implementation. As a human how would you cope with that? You can't recall any prior code you may have seen and you must write completely different code than anything in existence or face copyright litigation?
Group A : "Information wants to be free and we shouldn't patent algorithms"
Group B : "If you want to use our corporate stuff, you must pay"
Group A : "If that is the route you choose, we will still not charge for our stuff but if you want to use it, you must share your changes"
Group B : "If we use this tool that generates code, trained on the code that Group A created, it doesn't count as Group A's code and we can ignore their rules"
Group A : "It does count as our code, please abide by the rules."
More interesting to me would be; If I trained a LLM on leaked MS sources and built an OS or Office suite. Would MS be ok with that?