It is no surprise GitHub got sold; look at the investors and you know that they invested to sell later. We were worried about cloud repositories already some time ago, even started our own project (gitstorage.com) to be prepared whatever happens (we are totally relaxed about the GitHub takeover). It could have been worse. There are other companies with lots of cash that would have worried me a lot more.
One interesting thought was that whoever owns GitHub can feed the open and also the closed source into their AI machine to learn how to code properly. IMHO the terms of service of GitHub allow that because AI is not considered a third party. This could have some significant benefit keeping in mind that good code tends to rule the world; and Microsoft understands how to use AI and has the actual means to do something like that. This is speculative, maybe one day the history books will tell us what was the main driver for this transaction.