Why do humans life in families, while examples of families in the rest of the animal kingdom are extremely rare? Yes, economists have an answer to that.
Marco Francesconi, Christian Ghiglino and Motty Perry say when the evolutionary objective is to maximize the dissemination of one's genes and 1) paternity is uncertain, 2) children need a long time to develop and they overlap during that time, then families are optimal. Why? Because fathers will only care for the children they recognize as theirs. Fidelity of the mother is crucial for this. Add the fact that children need to stay with the parents for a long time, and you have a family.
All this hinges on the assumption that paternity in uncertain. Why did evolution not solve this? It did in a way, as it seems babies resemble more their fathers than their mothers, at least initially, as mothers naturally bond with their children and fathers need a little more "help" (Abstractless reference). Why did such a mechanism not reinforce itself? Probably because the emergence of the family made it less necessary. And maybe the family emerged for other reasons than this, as evolution had found a solution to this problem.