Matt Levine did quite a long writeup about this a while back: http://www.bloombergview.com/articles/2014-04-17/how-can-yah...
Taking an uncharitable view, Yahoo!'s core business actually has negative value -- and the current round of layoffs is a direct result of Wall Street pressure to stop subsidizing said core business and preserve the value of the Ali Baba stock.
I imagine the natural duopoly of tech is at work here. Google/Bing is pretty much it for web searching in the US, with no room for whatever engine Yahoo is borrowing this week. Gmail (gmail.com, google business apps, etc)/MS(Outlook/Hotmail, Azure, Exchange 365) for mail, etc. Not sure where Yahoo even fits anymore.
That last trade price times number of outstanding shares -- market cap -- is the only common basis for overall valuation of publicly traded firms (that is, the only basis that is guaranteed, by definition, to be available for every publicly traded firms) does not mean it is a particularly accurate and meaningful measure of the overall value in any useful sense.