Github is not just git hosting. It's issues, pull requests, wikis, CI/CD, actions, etc. All of which are lock-in points that would prevent most people from leaving.
I'm not blaming Github for this, I'm just pointing out that this is a serious problem. Even if you're a 100% benevolent company today, there's no telling what will happen in the arbitrary future.