The short explanation is: earnings are what matter. Valuations are almost entirely derived from future earnings and growth potential or expectations.

Using cash to buy earnings is often a very expensive maneuver, you inevitably end up paying rich premiums to acquire those earnings streams. Most big acquisitions are disasters. It's very hard to take $XX billion in cash, and buy somethings that will actually translate to an appropriate earnings stream for the next ten years such that it can even pay for itself.

Assets like the Alibaba stake often have tax consequences associated with them, such that you're never going to see the full cash value of the assets no matter what happens (if I'm not mistaken, Yahoo has already paid billions in taxes on previously sold off shares of Alibaba).

Companies with large cash balances, that typically tells you they don't require that cash to fuel growth. At that point the value of that cash to the growth of the business plunges. Something that isn't very important to growth, will be discounted heavily by investors.

A few examples.

Let's say you have equipment on your balance sheet. For example some small energy companies have a very large % of their assets held in equipment. If the company ever gets into trouble, such that that equipment really needs to be converted into cash (eg to pay debt coming due), you're going to get a fraction of the supposed value in a sale. The company will get squeezed. In almost any scenario where those equipment assets come into play, they're going to get knocked down in value.

Let's say you own real estate, a building for your headquarters. Unless you're sitting on really valuable land, or in a booming economic zone, more often than not you're going to take a beating on the resale value of those assets. The acquirer will probably have to do a lot of renovations, or perhaps entirely demolish your existing building; there is also likely to be plenty of other competing commercial buildings available. This is a typical problem faced by fading companies that purchase a trophy headquarters during the good years.

When it comes to cash (if you're valuing a publicly traded corporation this is even more frequently the case), the company is primarily valued based on its future earnings potential, cash flow, growth rate, margins, market position and sometimes intangibles such as brand (eg Coke) or patents: things that are primarily responsible for the performance of the business toward generating earnings and growth.

Most successful companies don't have a cash problem, they have a need for growth, and you can't just buy growth with cash (that's a fast way to vaporize very large sums of cash however). The market doesn't care if Apple has an extra $20 billion in cash on its balance sheet: the market wants to see Apple boost earnings by 20%.

The market will excuse all sorts of balance sheet disasters, so long as the net income is there, the cash flow is there, there's some growth, and the business is sound.

For example, Comcast, Time Warner, AT&T have notoriously terrible balance sheets. It doesn't meaningfully subtract from the the valuation placed on the business. Time Warner Cable has negative $21 billion in net tangible assets. They've been worth $35 to $45 billion in terms of market value for the last several years, giving them a 17 to 22 or so PE ratio - they're suffering no obvious $20 billion discount against their valuation due to the horrible balance sheet (they trade with a multiple comparable to their peers). Why? Because the market doesn't care, so long as their debt is manageable and the earnings are there.

Apple could discharge $100 billion in cash off to investors tomorrow morning, their stock would not drop by 15% to match that reduction in cash. Why not? Because Apple is primarily being valued based on its earnings, and expectations of continued iPhone growth generating ever greater profit levels.

Cisco for example has $53b in cash, and its market cap is $150b. If they discharged $40 billion of that tomorrow in a one-time dividend, the market would cheer, rather than crash the stock by 25%. Cisco has a 17 pe ratio, and its valuation is supported by its consistent earnings, not the cash.

That cash for Cisco has value to the extent it can be useful to provide more growth. Put one way: only a % of that cash is ever going to actually deliver growth, which is what investors really want. Investors would love to see Cisco be able to invest $10b in cash, and yield $50b in new earnings, but that simply isn't going to happen. What's going to happen, is that cash is going to sit there and yield terrible interest, and occasionally be used for a couple billion dollar acquisition. It has low real value, in the sense that whether Cisco has $15b in cash or $50b in cash, makes almost no difference to their earnings potential over the next ~5 years.

For Yahoo, $20+ billion in cash isn't likely to buy them a big fat profit stream worth $1+ billion per year, and the market knows it. Expectations for what that cash will do for the Yahoo business, are very low. Yahoo's core has problems, and cash isn't going to solve them. If the market believed Yahoo could take $20 billion and translate it into a new earnings stream worth $3 billion per year (eg $60 billion in new market value), the market would of course go crazy and bid Yahoo up.

And last but not least, the easiest way to prove all of this out is this: if Yahoo is doing $4 billion in sales, $500 million in earnings, and they discharge all of their Alibaba + Yahoo Japan holdings to shareholders, the theory would have to be that that $4 billion in sales and $500 million in earnings is worth a negative valuation for a public company. Now, it goes without saying that that is an extraordinarily dumb conclusion, that no person would reach in valuing a public company. If Yahoo simply did not possess any of those assets, nobody would look at their business, as a public company, and slap a negative $7 billion valuation on it. The fact that writers keep repeating that premise, well, I don't know what to say about it at this point.