Shareholders want near zero executive risk, and so they are willing to pay top dollar for proven executives...
That way, if things do fail, they can be confident that scrimping to save a few million in comp wasn't the reason they lost billions.
We overpay for quality in many areas of the economy. Neurosurgeons are one example. Roughly 0.5 people from each of the the graduating classes of the top 10 medical schools becomes a neurosurgeon. Supply is very, very small because the bar is so so high. Why? Because when someone is doing surgery on our brains we are completely fine with having a 10x overqualified doc doing the surgery.
This is similar to how the price of achieving each additional "9" of reliability is exponentially greater than the last one.
Yet systems with 99.99999% reliability still fail, some neurological procedures fail, and some highly paid CEOs do not lead their companies to glory.
Yahoo's shareholders decided to hire Marissa instead of many other, cheaper options. Nobody was duped, fooled, or scammed. Kobe misses the winning three pointer to lose a game now and then. Mayer is the closest thing the valley had to a sure bet for a company in need of product execution, so it's hard to fault Yahoo for wanting to recruit her.
It's too bad it didn't turn out, but let's hope she does something risky with all the money :)