It also has no relevance for the discussion at hand. Yes, Github can display all of its content – that's kind of the point of it.
But Copilot doesn't exist to show you random code snippets for the sole purpose of showing them.
Using this copyrighted material to create derivative works is a completely different use case, and not covered at all by the Google Books ruling, or any other I'm aware of.
What about Google Books Ngram Viewer? Isn't that a derivative work based on copyrighted content? It's more than just a search or preview - it contains both novel information and snippets of existing content. Is linguistic corpus a special case?
The research value actually turned activity that would be infringing into activity that was not infringing. Take away things like the ngram viewer and Google Books infringes.
But Copilot doesn't exist to show you random code snippets for the sole purpose of showing them.
Using this copyrighted material to create derivative works is a completely different use case, and not covered at all by the Google Books ruling, or any other I'm aware of.