People you don't know/aren't invested in are way easier to screw over than acquaintances. Friends are even harder to screw over than acquaintances.
There are people who can and will do both, but most people aren't sociopaths so they tend to care about what people--especially people with whom they've developed a relationship--think.
As a manager, you build a lot of relationships and you nurture them each and every day. You say hello to people and smile at them; you compliment someone on their new blouse or excellent email. You talk to your team about their specific concerns and in helping to problem solve, you also help them learn to problem solve. All these things build your relationships with people (and, of course, a galaxy of other emotional transactions and activities); as a manager, you have to be good at this soft skills stuff. Its a huge part of your job whether you're a PhD in Mathematics running a project or the head of a garbage collecting company. You need to know the stuff you're working with, yes, but you need to know the people and what motivates and demotivates them more.
People will work harder for you--as I've noted in earlier posts--if they like you. If they perceive that you are fair and will give what you get, they will give what they have. It's trust, but it's also good manners; we all have to be in the same place every day, five times a week, for eight hours a day. It's more efficient to get along, be friendly, and enjoy each other's company than it is to fight, and as a manager you cultivate that just as you would cultivate status reports or code check-ins.
A lot of managers get stuck, however, when its no longer just about building a relationship with them. I can shake someone's hand, I can smile at someone, I can bribe with chocolate or compliment attire or grooming. I know that I can do these things and get good results. However, if you can work with your team to build similar positive relationships between each other, you get a more efficient, effective, and fun to work environment.
But how do you get a collection of people--sometimes people you've inherited and didn't select yourself--to have positive interactions? In earlier posts, I recommended studying group norms and mnodifying them towards the social interactions you want. That's one way. Another is to personally chat with those folks, build that relationship with them yourself, and then use it to suggest they do the same with others.
For example, I am working at a client company as a consultant. I meet with folks for 1:1's once a week. I ask them what they're up to, if they're having issues, etc. We have a weekly meeting to discuss such items amongst ourselves, as well. Then I dispense suggestions on how to be friendly to the folks that could help them, or, as a team, we reinforce the behaviors that any one individual is looking for so that its easier to go along with the crowd and emulate that behavior than stick out and not do so.
So, for example, one person may talk about issues he's having and as the manager, I think it might be because the person with whom he's working is intimidated by him. I then suggest things he can do that are not invasive or aggressive to reduce that intimidation, to make him seem more human and approachable, and to encourage a stronger bond and friendship where before there was an issue.
Alternately, I can learn that my consulting team isn't getting all the information they need and the information is shared between two teams. As a group we can talk about the best ways to solicit what is needed, and how to be approachable and effective in getting that information, while working as a team; for example, Group A of the team may raise questions that require their team to go to Group B of the team, who just happen to have the answers that Group A and Group B have agreed upon in advance.
It's not just about building good relationships with you as the manager, or just about your team building good relationships with each other (although this post is a lot about that); it's about using good relationship building skills (ie: soft skills) to make the overall job easier between teams and on your own team, so people actually enjoy coming into work, and feel like they can trust and rely upon their co-workers.