Was GitHub really critical at time of purchase? Or has Microsoft turned it into critical infrastructure?
I would say all of those things were present before the acquisition, enough that Microsoft itself started to use the site for its own open source code hosting.
Do you think they would have bought it otherwise? Same for NPM, they got bought for huge sums of money because they were "critical" already.
And since the acquisition, they have built it out to be critical. Similar to what META did with Instagram. Instagram wasn't critical when META purchased it, but now it is the cornerstone of any business's online presence as it has been built out.