When searching for this kind of code, you have to wade through an awful lot of repos containing half-baked personal projects, experiments, unmodified clones of upstream frameworks, and barely-modified boilerplate examples. It would be nice if there was less of this detritus clogging up the search results.
However, sometimes the code you actually want is embedded in some otherwise useless, half-baked personal project, or barely-modified boilerplate example. So if all these projects disappear behind a veil of privacy, maybe it won't be a net win.