Families may be based on different kinds of adult relationships but the thing they have in common is that they provide a sense of belonging.
There are many reasons why family always comes first. Your family is there to give you the support, the love, and the honesty you need.
They are the individuals who have known you and been with you from the moment you was brought into this world. Family is the single most important influence in your life.
Along with the basic needs, a person has many psychological needs. Everybody needs affection, a sense of belonging, appreciation, and the list of needs just goes on and on, but most importantly a family provides the love you need. Family will give you the love you need without you having to grab it out of them.
Family blood lines give you a sense of who you are and where you came from. Like anyone else, family members don't always agree and they don't always get along - in some cases some family members stop talking to each other entirely for stretches of time, but they are still family and when push comes to shove, they are always there for you no matter what, through good times and bad.
Some friends are close like family and will stick by your side as such. However, many are not. Some friends are 'friends of the moment', the year, the decade, etc, but sometimes friends eventually move on. After all, they are not tied to you like your family is.
But among your family and your friend, who comes first.