Let's say that resulting value for the mating is the product of the "value" of the two involved individuals. We will study the case when each individual can only be involved in mating with a single other individual.
In this conditions, the close to optimum mating is reached when mating is realized between individuals with very close values. Mathematically, we have a set of positive numbers (the values) and we want to create the pairs of numbers so that the sum of products of each pair will be maximal. This happens when we sort the numbers and we pair each number with the one next to it.