Self hosting is not that easy, the biggest challenge is providing security. You don't want someone modifying the code by gaining access to accounts and merging pull requests, etc. I think this is what @aliashraf means by "github goes beyond that".
It would be really hard for them to ban BTC code unless there was some "National Security" label attached to it.
Good thing that bitcoin is international not national...