In terms of UI, Windows Phone was so far ahead of Android and iOS at the time (and in many areas still beats both of them. Android is still a mess). The Nokia Lumia series of phones also were solid with great cameras in an era of plastic Android phones.
I agree Microsoft flubbed the strategy, same with Zune where they had a technically superior product but no commitment.
Platform reboots killed any developer momentum they built - Windows Phone 8 apps were not backwards compatible with Windows Phone 7 which itself was a clean break with Windows Mobile. A lot of trending apps like Instagram and Snapchat never released apps on the platform, so you had to use third party knock-offs that chased private APIs. Microsoft did build some great social media integrations that tied your contacts into a single local profile across platforms (Foursquare, Twitter, Facebook).
They also kept rebranding and shuffling services on the phones - for example Zune became Xbox Music became Groove.