Even if it's legal for Copilot to do what it does, does it not violate GPL to take pieces of GPL'ed code and use them in a commercial product?
And the answer as always is "it depends".
Whether the GPL2 will hold up in court, or whether the courts will uphold this specific case (e.g. can you prove intent? Do you need to?), is a separate issue entirely.
The next question is, can I use GPL'ed code in my product and then claim that it was injected by Copilot to avoid repercussions of my actions if caught?
Not necessarily. Even 11k lines of copied code might fall under fair use, as Oracle recently discovered ;)
But why would copilot do this? It's a language model not a database.