These changes, particularly in the Yahoo case, reflect poorly on those managers in my mind, not on the concept of remote work.
The ideal programming environment is effectively remote- every engineer in their own office, with multi-party audio or video (e.g.: google hangouts) for collaboration.
If your primary cost is engineering staff, why would you make them %50 less effective when they're working and on top of that take 2 hours out of their day each day for a stressful commute?
All of my remote gigs have had very different cultures. People communicated, friends were made, etc, etc.
Because the engineers are not the ones doing the accounting or managing. The accountants and managers do. It's similar to how social events tend to be planned by socially-focused people, which is how a shy and/or introverted person can end up being dragged to a noisy bar for their birthday.