By the time github came about, git already had a lot more mindshare than hg. While hg wasn't yet clearly an also ran, it was clearly the less popular solution, and many open source tools started supporting git but either not supporting hg, or if they did it was an afterthought and often the maintainers broke something hg without noticing and then releasing with broken hg support.
just to be clear, i have worked with both hg and git, and can get along with either, but i do prefer hg.
have also written several foss tools - for example csvfix.
When it worked it was fine, but in the end you just got way better service and performance on Github.
The current iteration of Bitbucket isn't even Bitbucket, it's Stash. That works really well to, if you like Atlassian tools.