From a primal evolutionary standpoint, love doesn't make very much sense, except maybe for our children. Its our primal instinct to bone as much as possible and reproduce as much as possible. With as many partners as possible. We are here to pass on our genes and keep the species going, simple as that. Having affection and love for another doesn't seem practical in that sense.
Love for our children however is probably a legit thing. I mean, we're meant to keep them alive. And to do so, we have to really care for them, because children are ****ing awful. If we didn't feel some kind of love for our children, they'd all be drowned and abandoned by the third week of their life. Who wants an awful, screaming, pooping invalid for 3-4 years, and then once they learn to talk they somehow are even worse? A parent who loves their child. We needed that love to be programmed, or we'd just hammer all the babies.