Yahoo's failure is simple: they didn't stick to their knitting. I was a long-time user of Y mail and liked some of their other stuff (finance.yahoo...) but quit in frustration recently, the third time their search button failed to find emails I could see plainly in the Inbox.
Find something you're good at, do it better than anyone else, and keep doing it until it doesn't work anymore. Yahoo failed to do any of these things -- they've thrashed around for years, and don't bother to hire competent people to do the few things they were once pioneers at. Very sad.