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.