While I agree with your sentiment, I think it would be difficult for GitHub to open-source their product.
The limitation for them is obviously their enterprise offerings, which would be far less profitable if businesses could just roll their own GitHub instance.
I thought about it and couldn't come up with many SaaS companies that are open-source. Especially not with the same business model as GitHub.
I too would love an open-source version, but for the reasons above I doubt it will happen.