Imho, Microsoft buying GitHub is a bad idea.
if the code was open source why would they remove it?
Apple hosting code at Microsoft? Bad advertisement. It's political, really!
if closed source, how does it hurt open source?
It does not hurt OpenSource, and that's not what I meant. It's very likely, that the closed-source stuff will be moved away first, anyway. I am pretty sure that there are many companies, like Google, who were willing to outsource to a neutral company, but will have problems with direct competition.
However, it means that developers are fragmented over several tools, depending on the company they work for and the OSS they contribute to, which I would say is a bad thing.