http://revach.net/article.php?id=3654

Section:  Avodah   Category: 48 Kinyanei Torah
Kinyan 10 Dikduk Chaveirim - Friends, Friends, Friends
The mishna in Avos (1:6) places a great importance on having friends.  "Knei Licha Chaver", you should even buy yourself a friend.   Nevertheless says the Mili D'Avos (Likutei Basar Likutei) in order to be koneh torah you must be Midakdek, you must be scrupulously careful who your friends are.  

More than from anyone else, you are most influenced by your friends.  The group's passions will ultimately become yours as well.   If your friends interests revolve around the trivial and mundane you will surely not grow with this group.  If it is torah that interests them you will spur each other to new heights as the competition will force you to constantly push your limits.  The give and take will flesh out misunderstandings.  The back and forth will sharpen your mind and help you reach the truth.  All this will leave a permanent impression on your mind.

Barzel B'Barzel Yachad (Mishlei 27:17) like two sharp iron rods, says the Gemara (Taanis 7a), two Talmidei Chachomim will sharpen each other.  Furthermore says the gemara, torah is like Aish, fire.  Just like you cannot start a fire with a single stick, only with two, so too torah needs two people to light each other's fire.  On the other hand, fire can be very destructive.  In that case you best remain alone and not join up with a friend together with whom you will watch your life (and after life) go up in smoke.

Maybe thats why the mishna says you need to pay for good friends, since you get what you pay for.  Spend lavishly and choose wisely, says the Mishna, if you want to koneh Torah.