They can do whatever they have the internal capacity to decide to do.
They're richer than Facebook, sure. But at many non-tech companies, spending tens or hundreds of millions of dollars to build a solid library is simply not in the cards. (Why should we spend so much on engineers? All they're doing is slapping together some HTML, my nephew in high school does that!)
Surely WF's needs with YUI-fork (or any other similar library) will be limited enough that they'll need to hire just one or two developers. I don't see how they'll need to spend hundreds (or even tens) of millions of dollars to build a solid library. I don't think even Yahoo has spent that much on YUI in total.
To be fair, banks may also be grossly overvalued. Their market valuations are entirely dependent on large government bailouts (although Wells Fargo was certainly in good shape relative to their peers in 08.)
> Their market valuations are entirely dependent on large government bailouts
Hasn't been the case for years (and I'm pretty sure it was never the case actually). They are valued by their assets (funds in accounts, real estate holdings, equity in companies/investments, etc). Facebook's valuation appears to be based on nothing but magic.