Re: How can it possibly be worth that much?
git != github.
github gave us the pull-request, git cli will print something to stdout but github makes the whole process pointy clicky. They made the fork / edit / pull request thing possible from a person without commit rights to your project. This is a key feature, gitlab have it too now, neither are trivial to setup and manage. Github then wraps a social media thing around contributions, its far more than a repository.
If you install github locally or an opensource alternative you don't get "enough eyeballs" on your code. Microsoft is buying the ruby code and the eyeballs.