What makes people like other people?
is the question: What makes people like other people? or: how can you explain the phenomenon described above?

If it's the former, it has an answer already and this should be marked a duplicate.

I will try to answer the latter, if it can be considered on topic here.

Just because you have a mutual friend, doesn't mean you are going to be friends with someone. Humans are not this simple. The factors involved in deciding whether you like someone is very complicated. As you mentioned, the way you get introduced can definitely affect whether someone likes another person.

Humans have evolved as social creatures and our social interactions have evolved deeply like our intelligence. When you try to logically predict a phenomenon based on ONE factor when there exists a LOT more, you will not get a good prediction. It is not a strange phenomenon, it is quite natural if you consider the personalities that each person and the desires that they have in a friend. A and B might have a completely different type of friendship than B and D, by the way. To me, this question is misguided.