Internally, employees know well in advance when a company is headed downhill. When I was at LivingSocial, the best employees left at what appeared (externally) to be the peak of the company.
The trend was already apparent. Once you get to layoffs and press stories, your best employees have already gone. Two sayings that apply here:
1) If you're not growing, you're dying 2) People don't leave companies, they leave managers
Retention is all about opportunity: personal and organizational. A talented employee with many other opportunities must believe that those above them are beyond competent (providing room for personal growth) and that the company is trending in a direction to make vast organizational change. People, especially top talent, want to be a part of something larger than themselves.
When Marissa Mayer started, that bought Yahoo time. They had the appearance of organizational change. Once that honeymoon period ended, however, there isn't much to hold a great employee to Yahoo. At this point, if the best people are leaving, how do you recruit other A+ players? You can't.
People are the core of a company and Yahoo is many years down the line of rotting from the inside out.