Virtually every creature on the earth is divided into male and female and to procreate they must come together. Even though society encourages procreation in order to perpetuate itself, it simultaneously attempts to control sexual relationships in order to promote social order. Societies pass laws to try to eliminate the potential individual conflicts that result from sexual attraction. For instance, societies designate certain individuals as legally married and punish those who would interfere with that relationship. However, no law can put an end to the primal sexual drive which very often focuses outside the marriage.
Marriage is also a means whereby society attempts to distribute wealth in an orderly manner.
There are many logical reasons to have sexual laws. The majority of these laws relate to the elimination of chaos and conflict in a society. However, the fact remains that sexual attraction is neither logical nor intellectual. Sex between human beings is a highly emotionally charged experience. Few humans come together simply to produce children.