You're fundamentally misunderstanding my argument.
If you use AI to, for example, learn how to decompress or recompress a file, how can you be sure that the outputting function doesn't match one-for-one an (open or closed) source implementation? You literally cannot, as the AI system generally operates on a black box and cannot "learn" how to attribute and, cynically, the people who make the AI tools do not want to learn how to attribute code from the original developers. Since AI learns code from source code, there's a higher liklihood it matches a known implementation that it does represent a wholly unique implementation.
If you take Godot's renderer code (MIT project) and copy and paste it into a project that is also MIT, that doesn't mean you can get rid of the Godot attribution. You must preserve the attribution of the code -- this is important to learn for all open source developers.
The "learning" argument you're proposing, which is buying into AI anthropomorphisation, still doesn't protect you from copyright. If you have photographic memory and worked at adobe, for example, you can't simply "learn" the code and output the same code to an open source competitor. This is generally why people who work on closed source try to avoid working in same-field open source -- the risk of violation is way too high unless you intentionally break design decisions.
Individual code snippets might not be covered but it depends on the line count -- but that also changes from territory to territory. IANAL, so my general advice for people who are "learning" from closed source to contribute to alike open source: just don't. There are other open source projects that can use your skills. And if you're looking at other open source projects and taking whole functions, you must attribute the project in question (this is pretty easy but depends also on the license of the code you're looking at.) AI doesn't have the capacity to understand any of this nuance, and I'd argue it doesn't understand this by design: hurting copyright hurts open source more than it hurts big exploitative businesses.
Worth noting, most documentation for a language will generally have CC0 copyright. But it is important to copyright code snippets in documentation, otherwise you can argue that the copyright is non-permissive (wholly owned by the individual who posted it.)
I just updated my home network to 2.5gb so I'm glad to see this.