Probably because you're nowhere near as "locked-in" to GH. You can move your source code and all of its history to another hosting platform in minutes with git.
If you want to move your Slack/Discord community to another platform, there is no easy way to export the content AFAIK.
Not true. Good luck exporting the issues, pull requests, comments, discussions, wikis, etc. and bringing those to another platform.
Ironically (and I am not defending them), Slack[0] is the only one of the three that has an official way to export all messages. GitHub does not, unless you're counting their API, but then maybe you want to consider Discord things like this[1]?
If you want to move your Slack/Discord community to another platform, there is no easy way to export the content AFAIK.