Well you have to work, so it's better to do it with people you like.
Obviously, if you didn't have to work, you wouldn't work just to see office mates.
But if you do have to work, slogging away in a common place with friends is more compelling than sitting behind a computer.