There are two reasons for this. Emotional attachment creates decision bias which will eventually interfer with the job function of your boss (and/or your own). Leadership often needs detached objective assessment and you want your boss to have that capability.
The second reason has to do with group dynamics. Events play out differently when the boss is in the room (e.g. no venting). Keeping some distance is often the only way that a superior can encourage the growth of good staff dynamics (e.g. formation of informal leaders.
Both of these are good reasons why being a loved buddy relationship is neither practical nor actually desirable for a boss-staff relationship. It doesn't mean that you can't be friends though. Mutual support, assistance to success, (some) shared interests and so forth are all possible (and a usually good thing).