Because code derived from GPL code is also GPL. Co-pilot (sometimes) intelligently copies and pastes GPL code.
I’m not happy with the Co-Pilot situation either but for the sake of correctness it should it should be pointed out that your point hasn’t actually been tested in court with regards to machine learning. In fact some lawyers have suggested the GPL might not cover that particular scenario.