Microsoft lost because they didn't have the users or the apps. It's an instructive story of how an inferior product can win. I'm not saying that happens all the time or that it's inevitable, but I think it's safe to say that's sort of what happened here.
I wonder how much of it was because they had a sorry arse mobile browser? Not supporting ontouchstart etc events must have been a killer. MSPointerEvent was awfully buggy in the initial release, and what dev wants to rewrite their web app/page to use PointerEvent?
Why wouldn't you make sure Hybrid apps (Cordova etc) work well? Why not just copy WKWebView (20/20 hindsight now!).
Their equivalent of WKWebView is some sort of zombie IE11 version (not edge, with different features and flaws than IE11 desktop). Hideous.
Disclosure: we developed a Hybrid app for Windows Phone (based on Xamarin).
A far cry from developers, developers, developers.
Also being able to select text from most anywhere was useful.
Windows Phone though? Absolute pleasure to type on. I've never used any device that was easier to type on than my old Lumia 920.