That said, majority of Yahoo employees fit neither into "not employable elsewhere" nor "absolute genius who is hanging on because he is working on the Cure Cancer feature of Yahoo Horoscopes". Far more common were/are people who joined either from graduate school, a startup that burnt them out, a far crappier industry (e.g., government, finance, etc...), who wanted to do something cool (and usually there were chances to do that at least initially on the team you joined) and stayed despite much badness (e.g., their project being cancelled) _not_ because they did not think they could do something as good elsewhere, but because being at Yahoo was a known quantity of pain.
That's the default mode of behavior for most people and it's fine to hire these kinds of people as long as there are others to balance them out -- but not into leadership roles at startups (anyone of the first 15 people in a startup is probably in a leadership role even as an individual contributor). That said there are limits: there were people who were doing very little in their roles and thought neither internal transfers, nor job transfers, nor personal side projects -- I'd have a hard time hiring such a person.
Keep in mind that WhatsApp founders did leave to found WhatsApp (obviously...) and when they were at Yahoo they worked on very challenging and interesting things. They were early employees (as in 96-98), (de-facto or de-jure) technical leaders, and Yahoo was their baby: they had a vested interested and non-negligible ability to have a positive impact at Yahoo and they certainly did.