To me, it's more like GitHub won; Git came along for the ride.
Back in the day when companies evaluated Git and Mercurial (Facebook, Google, Microsoft), they decided Mercurial was better. Mozilla used Mercurial for a long time until switching to Git fairly recently.
But once GitHub took off and became the center of gravity for developers, it became the de facto standard.
It also explains why there have been several attempts (Sapling, JJ) to use Mercurial's semantics as a front-end for Git.