We nurture our children and favor our relatives because doing so has a good chance of helping copies of the genes for nurturance and nepotism inside the children and the relatives. People tend to be nice to those who are nice to them. The theory that human social behavior is a product of natural engineering for gene propagation came to be known in the 1970s as sociobiology, and was summed up by saying that the brain is a fitness-maximizer, or that people strive to spread their genes. But there was one problem with the theory. Much of human behavior is a recipe for genetic suicide, not propagation.
People use contraception.
They adopt children who are unrelated to them. They take vows of celibacy. They watch pornography when they could be seeking a mate. They forgo food to buy heroin. In India, some people sell their blood to buy movie tickets.