I doubt Twitter is making deep cuts so they can keep their friends. But it does help to like the people you work with.
This probably doesn't happen in smaller startups, but I've worked in several medium and large size companies and have seen it happen.
It doesn't matter if you're getting along with your coworkers, they aren't the ones making the layoff decisions.