They were selling an interpersonal communication device, and the organizing principle was a Contact. It demoed terribly because without your personal contacts loaded the OS made no sense. WITH your contacts loaded it was magic - you pinned your boss or your mother or your friend to the home screen, and it showed you every communication with that particular person across all channels. You spent some of your time at the OS level (not in a particular app) and most of your time not on your phone at all.
IOS and Android were selling a pocket computer for media consumption. The organizing principle is the App. They demoed great, because Apps demo great without personalization.
Windows Phone failed because they didn't take apps seriously. The devices were insanely underpowered, and App Stores became OS-specific walled gardens. No one was going to build a third version or their app when it was annoying already to build two.
Windows didn't take apps seriously because they took the category name "Phone" very literally and positioned themselves around purposeful person-to-person communication. They failed to understand that the App Store revenue stream was actually what would keep the product line afloat and they had nothing similarly high-margin to replace it with. For people who still wanted to do that, it was amazing... but what most people wanted was a pocket computer called a "phone" that would be used to consume media, some of which came from their friends (not any particular friend) and some of which didn't.