If you have actually learned from the code, you learned about code structures, and yes, they are attributed/named/noted.
Everything from "Gang of Four" patterns to applied mathematical algorithms like a Fast-Fourier-Transform have attribution and history.
Where I find myself frustrated with the general argument you put forth is that it alleges that pattern-extraction is the extent and essence of human learning.
I do not think that the current LLMs-are-AI trend has grasped neither the essence of intelligence nor learning.
I recognize that one cannot paint an entire field of study with broad strokes, but there is a certain amount of in-industry Kool-Aid consumption that, while perhaps rewarded by more gullible portions of the market, is poisoning the public well of goodwill.
This can only lead to a very harsh backlash, which we already observe undermining the deeply-funded attempts at foisting this stuff upon the world at large as "AI"
Computers are not human being and never will be.
The fact stands that CoPilot has no notion of code outside of its training data and is merely a pattern-extraction machine.
You can dismiss this claim, but you cannot disprove it.