They could have been successful if they wanted to just make a phone, but they wanted to make the phone on their terms.
In a way this was because the phone didn't utilize Microsoft's strengths effectively enough to acheieve consumer success, as well as a general strategic problem with Windows and it's design in general.
They should have made the first release basically an XBox phone if they wanted to get consumers on board. Gamers are a target audience that would be willing to make sacrifices to jump onto the platform and establish a user base, which is required to develop a decent ecosystem.
The whole 'Metro' interface has really been a failure for Microsoft as well. They should have simply stuck to Aero or a derivative of it, and kept mobile and desktop computing separate as Apple has.
And of course there's the whole issue of timing. Ballmer didn't seem to take iPhone seriously while Google did and they took immediate action to establish a viable alternative. Had Microsoft had their eye on the ball, it very well could have been them dominating the smartphone market. Or at least they could have been a third platform that actually survived.
Even after getting my 8.1 device axed from the W10 upgrade list, and being pissed off about it, I did bought an W10 device.
My W10 device still gets updates, while my 1 year old LG is stuck on an random 2017 patch level.
It's obviously not an easy space to enter.
"Courageous Design – embracing successes and failures through iteration. : Build 2018"
In my opinion Windows Mobile 10 fizzled out because of a few reasons; the most important reason was organizational changes meant nobody cared about Windows 10 on the phone, and the releases were pretty bad for the first year. The other important one was that for quite some time, the 950 was the only phone it was reasonable to buy that had it, and it was too expensive. The 650 was basically the same hardware as the 640, but shipped with WM 10, and was more expensive.
Also, they had promised all WP8 devices would be upgradable to Windows 10, but then they pulled it back for low memory devices (which makes sense, because it was sloowwwwww, but still)
Some form of Windows Mobile held close to 20% of the market before Apple came along with the iPhone.
Selling an Android in an Android world is completely different.
If Microsoft/Nokia just sold (near) stock Android phones, I would have bought them in a heartbeat.
Windows 7 started by making all the taskbar active app buttons similar. If you had multiple application windows open, with multiple app buttons, then you couldn't easily tell which window was the active window. This continues to be a frustration.
Windows 8 was a colossal mistake. They pushed a tablet design, for everyone with a PC. You had to simulate the swipe-from-the-right, by clicking and dragging your mouse from the right side of the screen. Huh? Who thought this was a good idea? And this level of mistake came from a seasoned OS manufacturer? How idiotic was this team?
Windows 9, I mean, 10, was, is a hideous nightmare to use. It's UI is still half-baked. They killed all colors, that helped to give identifying information on an icon or a text, and made everything flat and gray. It's like I went color blind, and have to look at everything in black and white. This makes it harder to use.
Office, they went over-board with the flat design. Things that used to be easy to identify before, are now more difficult, because they removed color from their interface.
Windows phone. Why would I want Live Tiles that constantly flip on me, for no apparent reason? Every time it flips, it just constantly asks for my attention. This was a poor design choice.
And also, the flat design, and lack of color on their Windows phone. Everything is all one color, which means that I have to look at every icon, to identify what program I want to open. Whereas with the iPhone, I just look for the icon with a particular color, like red.
Of course, this is just my personal opinion. And there are people who love the flat designs, and Microsoft's decisions to make everything ugly and more difficult to use.