Many people leave academia after a post-doc or two, most actually. These people will not have any incentive to manage their research data for the rest of their lives and the data will eventually be lost, unless GitHub continues to exist in its current form for the next half century, with is rather unlikely. For this reason we need dedicated research repositories that are managed by publicly funded non-profits. Zenodo.org is one example but I'm not sure if they have long-term funding.
The whole idea of git is that it is decentralized. So, even if GitHub instantaneously shut downs and erases all data (unlikely, they'd probably give a few months for people to move their repos), people's copies of the repo can be uploaded to servers.
Well, as long as you aren't using any GitHub-specific features, it should be easy to migrate your repository.