Well, the answer to these things is a fairly complex topic. MS was reasonably invested in mobile until it started to hemorrage in the marketplace. In places like Europe and Australia, they still have okay market share.
But ultimately, there is not much OS "room" on any marketplace. Take desktops for example, players have been trying to take that on for years. OSX is still relatively small, and a tiny part of apples profits.
What you need for a successful product is a real "MOAT". A moat means a thing your product has, that no one else has - something people want. Like with desktops, in mobile there have been a lot of contenders with samey products. Windows 10 Mobile, Android and iOS are relatively similar. There's simply no room in the market for another "me too".
MS has plans to resolve this. Leveraging windows cloud and windows on ARM into the tablet, hybrid and laptop markets to gain more marketshare in larger cellular connected devices. Which will increase mindshare and number of apps, if successful. It has a real "moat" there in terms of touch, stylus, ink, convertibility, and full desktop OS power. Ask anyone who's used a lot of tablets and laptops and tried some new convertibles - generally they'll have a soft spot for windows. Like on the desktop, it can do more. The product in way, speaks for itself, it's moat is self-evident.
MS is developing conversation as a platform with its Cortana bot intergration. This is essentially an "app" (with assistants these are called "skills") ecosystem, under Cortana. This would also be a moat if windows can get ahead in the emerging voice platform - a platform that will make touch apps more redundant. This intergration and the emergence of a great deal more Cortana "skills", is like cloud, very close; MS has told us.
If it can succeed in both these areas, we can see new forms of pocket cellular device, beyond mere touch slabs - convertibles, stylus empowered, voice driven, wearables - watches, clamshells, and all sorts. And then, these devices will be competitive - offering something better, being better.
But in general you can't just throw money at something to make it work. And keeping in mind, MS has less money than google or apple by several factors. Hence why as time goes on, it works more closely with partners. And why Samsung and MS are starting to look my schoolyard chums.
If you look at the windows store, you will see it themed "education" ahead of the announcement of windows cloud in may (well this does change day to day, but you'll find apps like complete anatomy, sketchable, flow charts, earth 3d etc have been given some spotlight over the last while). There is a serious weight of educational apps in the store if you look under the apps section - there is a lot. This is no happy accident, and has clearly been in the works for awhile. Like all its other market plays.
MS isn't resting on its laurels, it's just playing chess with all the market pieces, trying to get to where it can win again in pocket devices.
And it's not the only one who's looking for the next thing. If slab phones were the eternal be and end all of tech profit, amazon, Samsung, apple, google would not all be furiously also investing in future technologies as well. This is a game that never ends - MS hasn't given up on mobile, it's just planning another way in. If it had given up, there would be no new phones, and no updates as there are with BB10 blackberry devices.