Microsoft used to see Linux as competition, and while that might still be true in some ways, it’s largely moot for a couple of reasons.
In 2019, Windows isn’t competing with Linux for desktop market share not because Linux poses no threat there, but because the desktop doesn’t matter anymore.
Windows, and the desktop operating system as a concept, is competing with the web browser in the enterprise and mobile devices in the retail market (and even then, it’s not really a competition - most casual users gave up computers for smartphones years ago).
Viewed in that lens Microsoft genuinely embracing Linux makes a lot of sense - most of their revenue now comes from service contracts, and the one bedrock they’ve always had is their second-to-none developer support. If developers want them some Linux, then by gosh Redmond is going to give them more Linux than anyone else. Maximum Linux for your organisations’ Linuxy needs!
Microsoft still has great support for gamers on Windows as an incentive not to check out Wine/Proton and things happening there, but really, when was the last time you paid for a Windows license for home use? One way or another they’ve been literally giving the software away as quickly as they can for years. The future is about services, and that means market share (if users leave because they can get a free OS elsewhere then the license has to go). Likewise, if it gets more developers to stay in the ecosystem, then Linux support it is.