...and not compensating (or even attributing as required by the licenses) the authors for it.
Copilot learns the "shape" of code. Common patterns and algorithms, etc. You can't copyright an algorithm.
If you trace a picture and use it in your work of art, does the copyright of the original picture no longer apply?
If you copy a tune but set it to new instruments, does the copyright of the original tune no longer apply?
Sampling is a legal minefield in music, why would it become less of a minefield in code just because you've automated it? So far the best attempt at an answer about the legal issue of Copilot I've seen was that it's "not technically violating copyright", which honestly is not very reassuring and extremely morally inconsistent for a company built by a guy[0] who is philosophically invested enough in intellectual property as the pillar of human society to write An Open Letter To Hobbyists and use his Foundation to convince entire governments of adhering to IP laws instead of allowing the mass production of vaccines and medicine.
[0]: Yeah, I know that he no longer serves an active role in the company but this was very much a founding ethos and this is at least a fair bit hypocritical.
Copilot isn't sampling. Sampling is literally copying snippets of someone else's music and putting it into your music. Copilot doesn't do that. There's no giant database of text that it just slurps suggestions out of.
Just seeing someone else's code is hazardous from a legal precident point of view