git won in the greater world because of github.com. There was nothing at the time for mercurial OSS hosting.
And at that point, even the use of dvcs was in question, so you could use svn on google's forge, or sourceforge. Launchpad had bzr support too.
It wasn't clear github was going to win until it was clear that git was going to win.