From what I understand, it is not proven that the AI uses the knowledge of concepts and logic to write the new code. It is likely that it actually performs instead a very optimized stitching of code it previously saw.
Is my understanding outdated here?
From the ethical point of view, I'd say you're making some assumptions here that result in it being ethical when a human does it, and those assumptions might not hold for an AI.
For example, you're assuming a win/win outcome, where your learnings from copyrighted open source code don't harm the original authors ability to find work, or the value of their code.
With an AI I think there are possibilities we're looking at a win/lose situation, where Microsoft wins big, and maybe some other developers that also profit of their use of copilot, but where the original authors of the code that went to train it see their skills be devalued over time as a direct consequence.
In my opinion, a win/lose is unethical. What I'm not convinced is that we're looking at a win/lose, but I think there's a possibility.