There is nothing wrong with embracing popular tools and tool chains. If you don’t, you risk being left behind and overtaking.
Although Windows is still an important platform for MS, the number in conversion is declining year after year. MS is fully aware of the fact that the future will be less dependent on the platform a person is working on.
Thanks to Azure, MS sees a lot of demand for tool chains and services in Linux, and so it built WSL. The concept is not that strange. In the 80s MS had their own Unix architecture and had a POSIX environment in Windows for years that only expired in 8.1. With WSL, they brought back the ability to bring the space of Linux users to Windows.
Also, taking over Github is not unusual. With Visual Studio they have a product that is used by a huge number of developers. Especially since the free version was released. In addition, MS is increasingly working on its own free and open source software projects as well as on other projects. Instead of competing with Github, they took over the platform. This gives both MS and Github more opportunities.
With Andoid it seems to me that it’s mainly about synergy. There are not many applications in the MS ecosystem and never will. With compatibility with Android, they bring many of these apps to Windows. Something Apple is now trying to achieve by running iOS apps on macOS.