I'm not a lawyer, but if you provide a platform that enables infringement that's different than if you provide a tool that could enable infringement.
Popcorn time vs. bittorrent.
And you are right the EULA could say "it's up to the end user to confirm you can use this code". But then how do you verify? That slows down "productivity" where copilot promises "speeding up" productivity.