Critical mass. Everybody is on GitHub, therefore, everybody is on GitHub. It takes a significantly better product, plus some serious stumbles by the incumbent, to switch that up.
For instance, before GitHub, there was Sourceforge. Github came out with some nicer UI, and rode the wave of git becoming more popular than svn. Meanwhile, Sourceforge got bought out and went scuzzy, injecting malware and toolbar garbage into installers for the ad revenue, and people got fed up and bailed.
I have Github at work, for private projects, public OS projects and am part of at least one other organisation. Its comfortable to have everything on a single interface and use the same tooling for all of them. Also i still think Gitlabs interface is confusing, even thought i use it since >1 year.
For instance, before GitHub, there was Sourceforge. Github came out with some nicer UI, and rode the wave of git becoming more popular than svn. Meanwhile, Sourceforge got bought out and went scuzzy, injecting malware and toolbar garbage into installers for the ad revenue, and people got fed up and bailed.