The difference between that and having an AI do it is probably low. My gut instinct is that using an AI constitutes "access" to the AI's training corpus, so if it spits out something at least substantially similar to that corpus, then I'm infringing if I use that output. If it doesn't constitute access, then a copyright owner would have to prove "striking similarity", which would really only cover things like using Copilot to spit out fragments of old Quake code verbatim.
Clean-room is a way of arguing down the level of access that you have to something that you want to make a non-infringing copy of. It usually requires having actual attorneys review everything the clean-room engineers get to see, and stripping out the parts that are actually copyrightable. Merely training an ML system on input as a way to only have access to the uncopyrightable parts of that input probably wouldn't work.
Pretty much every Internet service is going to have similar clauses to GitHub's; because anything else would basically be a "click here to make me liable for copyright infringement" button. In fact, I wouldn't be surprised that merely running something like GitHub but without a ToS would still give you similar levels of implied license over whatever people push to your server.
The specific part of their ToS I was talking about was the (paraphrasing) [we can use your code to improve our tools and services] part.
Tangibly, how is this AI method substantially different from non-clean-room implementations?
In terms of business use, it seems incredibly risky to me to even just *use* GitHub since their license agreement/ToS permit them to use my code to improve their tools which now apparently includes tooling where it may copy your code wholesale as someone else's suggestion.