So here are some thoughts. For some people, a friend is simply a person who talks to them more than once or maybe it's a coworker that survived some intense project with them. There are probably hundreds of ways that we meet and find our friends. What I find especially fascinating is how people relate to someone that they call a friend. One theme or heuristic that I've seen people use, consciously and not, is the notion that the people you're around are resources.
People form relationships and friendships to obtain something.
This is natural and probably evolutionarily sound. Dr. Robert Axelrod, a political scientist, once conducted a series of computer simulations based on the Prisoner's Dilemma. Basically stated, there are two prisoners who are being asked to testify against the other prisoner. If neither of them testify, they both serve relatively short sentences. If one testifies and the other doesn't, that prisoner goes free while the other is left to languish.