I don’t understand why any of this would take submarine money to build. GitHub itself certainly wasn’t built with submarine money.
The backend could be git on an SSH server, but if you have a slick design and 100% operational uptime-- you'll capture 80% of the developers using Github currently.
Github, outages and all, is a known commodity with a reputation they can make money off of.
Any replacement would have to offer not just compelling feature improvements and uptime, but to have a history long enough to make it trustworthy to migrate to.
And uptime? Easy when you have a small number of customers. Much, much more difficult at a million+ customers (although Microsoft has really dropped the ball).