Since every post here has focused on the consumer end, I'll offer my take from the supply side.
The reason Windows Phone never took off in any meaningful way is the mismanagement by MS.
1. OEMS: Microsoft lost the OEM market before they even began their WP journey by establishing rigid hardware requirements and forbade them from altering the look and feel. The positioning from MS at the time is "We" want "Our" consumers to have a consistent hardware experience across the ecosystem. By tying the OEMs' hands on any sort of differentiation, it severely limited the appeal. What OEM want's to be just another me a
2. Carriers: Since many carriers are also landline operators, there is much tension there, as MS have slowly been eating away at those value added profits by providing PBX integration to Exchange and then the ultimate insult, buying Skype. Carriers have no love for MS.
3. Software developers: By insisting (initially) that all Windows phone apps had to be sandboxed in a little silverlight container meant many developers who could've potentially developed an app, did not do so due to the steep learning curve. On top of that, the limitations of the OS / Silverlight layer meant many apps simply were not possible.
4. Stupid pivots: not the UI, but the radical shifts that occur with each re-imagining of what Windows on the phone should be. They went from a well thought out, simplistic design, to Continuum. Each shift in the roadmap meant much rework to fit in the new runtime/ecosystem. To the point that many apps in the Windows Phone store today are still their original WP7 Silverlight apps. Silverlight -> Windows Runtime -> UWP (Windows Runtime 2.1).
5. Bad design decisions: The biggest failure in this journey was having TPM as optional in WP7 and mandatory in WP8. This left the consumer with a bad taste as their devices were immediately cut from the WP8 upgrade path, in clear violation of the promise mandated by MS when WP7 launched that "Our devices will have supported upgrade path for 18 months".
When MS stack the deck against themselves like this, failure is imminent. So they backpedal with the OEMs and allow them to recycle their Android designs, which in turn meant much work for the UX team to support new screen ratios. Now, in this iteration, they try to bypass the carrier. Microsoft made the mistake of thinking they were still the 800 lb gorilla in the room, using their clout to get others in line with their vision, rather than collaborating with the different players in the ecosystem to build something that works for everyone.