The biological imperative is to get copies of you genes into subsequent gene pools (generations).
The more successful an organism is the more copies of its genes are present down the line.
Sex mixed genes and causes variation.
Variation enables mutation and adaptation to change. It gives a greater chance of success.
Males and females use different tactics to get greater chances of success.
Males produce billions of sperm. They can physically father thousands of offspring.
They are less choosy about who they select to mate with.
They go for quantity of offspring and not quality.
The ideal circumstances for a male is to have a stable relationship in which a small number of children are cared for and nurtured. This gives them a better survival rate and hence a greater chance that his genes with successfully survive into future gene pools. But at the same time to mate with a number of other females and impregnate them. They will then bring up his children in other nurturing environments without him having to contribute.
Females only produce a small number of eggs. Due to the length of the gestation period they can only mother a limited number of children.
They go for quality over quantity.
They are more choosy about who they select as a mate.
They attract in a number of males and select the best to mate with.
They then create a stable relationship in which both male and female nurture the children giving them the greatest opportunity for survival. That way she ensures the maximum number of her genes in the next generations.
The ideal circumstances for the female is a stable relationship in which the children are cared for and nurtured by both parents. This gives them a better survival rate and hence a better chance that her genes will be there in the next gene pool. But at the same time it would be advantageous to have relationships outside of the marriage so that some of the children have different genes. This creates more variation and gives a greater chance for her genes to survive.
Both sexes have a vested interest in both stable relationships and affairs. Infidelity is biologically programmed. Perhaps humans need to reflect on our social models for marriage?