I don't think this has anything to do with the engineering challenges they have to solve at Facebook or the fun working environment. As that code-leak incident hinted some time ago, Facebook probably isn't more than a huge pile of spaghetti php-code. The only motivation of people for switching is greed. Facebook is pre-IPO, so stock options can potentially make some employees millionaires in case of a good IPO.