>How exactly is releasing the .NET framework on Github a lock-in strategy?
In the way described in my original post. Open-sourcing the .NET framework means people will help them port it to new platforms. It means that people will be able to get the .NET framework running on whatever is running in their corporate cloud. This means that users will continue to develop in C#, using APIs developed by Microsoft that will always work best on Windows, using development tools provided by Microsoft that will also always work best on Windows.
If your company switches from .NET to Java because .NET doesn't work well "in the cloud", then your company starts to ask other questions, like "Well, we don't use Visual Studio anymore, so we don't need to keep paying Microsoft $xx,xxx per year for that. Everyone likes Mac a lot and we don't have to use MS's dev tools anymore, so why don't we move everyone to that? We can start to phase out our Windows Server and SQL Server licenses too since we're not using any other Microsoft stuff and then we won't be paying them another $yy,yyy and we'll be one of the coolest companies around because everyone will be using a Mac."
MS's strategy of opening the foundations of their platform so that the applications can run on any backend makes it so you instead say "Oh, we still run .NET apps on our AWS cloud, so we still need Visual Studio, better keep paying MS $xx,xxx." And "oh, SQL Server runs in our cloud infrastructure, so we can stick with that; that's another $yy,yyy for the license this year."
If you stay on MS's platform, they can then call you up at any time and say "Hey, switch to Azure, it's a lot cheaper than AWS because we don't charge ourselves license fees." On the other hand, if you move off their platform because MS tech doesn't work well in the cloud, they lose a lot of existing revenue, a lot of potential revenue, and a lot of mindshare and exposure that decreases their relevance in general.
The key to MS's lasting success has been .NET. That's what's been propping up Windows and consequently Office. If they lose .NET, they're in deep trouble. They are going to do everything they can to keep it alive, even if it means making it so your ASP.NET web app runs on a Linux server.