Well, GitHub can digest all code hosted on their to power their Copilot, regardless of license. And GitHub is owned by Microsoft, so big tech company is involved. I personally don’t have a huge issue with it, but respect those seeking other sources.
And sometimes code doesn’t have to be publicly, even if open source. GPL software can mean that the end user can request the source, not necessarily that it’s provided off the bat. Also, OP didn’t say open source, could be some private repos.