Github is free to use for open source projects, self-hosting by the government would only make it more expensive for the tax payer.
That's the problem though. In principal, if they only use pure-git operations in the process, it would be easy to move at any point. But if they leverage the entire Github platform, i.e. PR discussion, issue tracking etc, then important parts of the legal history will be bound to the github platform.
And that's not great. Github is free for public projects for now, but as with any publicly traded tech company, they're able to change the terms of use of their product at any time to suit the needs of the company.
When we're talking about enshrining the laws of society, we're talking about a very long-term proposition. Technology companies pivot and or kill products all the time. What if we decided to record legislative history on Google Flow?
That doesn't solve the interop problem that would exist in trying to implement secondary UI systems that can redisplay that information usefully, but ETL of that sort is full of options and developers with experience.
JSON dumps of GitHub information would be useful to more open source projects beyond legislative history. I think a good automated solution could be generally useful, if someone wanted to invest in it.
They also have self-hosted enterprise contracts so I'm sure something like that could be done if the government were interested.
If we are talking about accepting PRs for drafting legislation in git, where it is hosted and who hosts it becomes extremely important. Sure anyone can clone/fork, but only the appointed central repo could become law. A clone that you or I make will likely never have this ability.