It's a large pile of open source software. It's able to be redistributed freely, by design. Everyone is in the position to take advantage of the catalog, if they can somehow solve the demand side -- that's what the entire problem of a store is about. F-Droid has been trying for years!
Companies host their private code in private repos.
I’m not saying it’s the best thing for GitHub to do, but...
Let’s say 15% of Android top 1000 apps are sitting in private repos on GitHub. With their build tools GitHub make it possible to automatically push builds to this imaginary store, they offer devs 50% discount on whatever cut google take if on the play store.
You're right, but you don't need to be GitHub for that. Any dev can create an app that integrates with GH, or any other source control service for that matter.
If GitHub could somehow solve the demand side (Phone users) they'd be sorted.