It depends on culture, mainly office culture of the place. I am not a manager, but I do manage a couple of rental properties and the problem with getting friendly with the tenants is that they want you to do them favors, and it becomes harder to reject when you know the person and their problems.
So the main issue at work is when you get to know your employees at the personal level, it becomes harder to assert your authority and it becomes unfair to other employees since you might be seen as taking favoritism.
Now it all depends on culture. If everyone is friendly and everyone is helping everyone outside of work, then no one is treated unfairly because person A would get the same help as person B if need be. In such a culture, if one sour apple is trying to gain favors, it is easier for everyone else to reject that and the upper management wouldn't lose his/her authority over his employees. However, on the vice versa, if only one employee is the boss's friend who he helps outside of work, then everyone may turn against the manager and this employee.
In the OP, you cited examples where people question if they should have done favors for employees. However, there are several examples on this site where employees see a manager who does one person favors. You can see the type of conflict it creates since the employee is confused why the manager treats them differently. These types of questions are generally closed because the employee is basing opinions on guesses rather than facts about the situation but regardless you can see the doubts it would cast.