Much of the ends of Parshiyos Acharei-Mos and K'doshim are devoted to a detailed description of the many prohibitions against ‘arayot (forbidden relations) with Acharei-Mos containing the azharot, the prohibitions, and K'doshim containing the ‘onshim, the punishments. The devotion of two entire sections of the Torah to these prohibitions indicates their centrality. This is further verified by the punishment of kareis (excision) imposed on violators and the fact that these prohibitions are one of only three categories of prohibitions that necessitate forfeiting one's life even in private and not during a time of religious persecution (sh'as hash'mad) rather than violate them (see Rambam, Hilchos Y'sodei HaTorah 5:2).
Interestingly, there are contradictory sources about whether to place ‘arayot under the category of chukim or that of mishpatim (see Rambam - Sh'mone P'rakim (6), Yoma (67b) and marginal note there, and footnotes of R. Copperman's edition to Meshech Chochma (K'doshim 20:26). As R. Copperman suggests, one can distinguish between different types of ‘arayot.) Even if they are categorized among the chukim, nonetheless, many early and later Jewish thinkers have proposed a variety of fascinating insights into these prohibitions. (See The Kashrus Laws and Ta'amei HaMitzvot for additional discussion of ta'amei hamitzvot and their limitations.)
Rambam (Moreh N'vuchim 3:49) suggests that in order to serve as a safeguard against excessive physical relations, the Torah forbade relations with close relatives with whom one would likely be in close contact. Ramban (Acharei 18:6) rejects Rambam's reason and suggests a reason based on kabbala. A different kabbalistic approach is taken by Rabbeinu B'chaye. More recent commentaries have offered some additional, novel insights into these prohibitions. Maharal (N'sivos ‘Olam; N'siv Ha'anava 4) quotes the cryptic statement of R. Chama b. Chanina (Sota 4b) that a haughty individual is viewed as if he violated all of the ‘arayot prohibitions. He suggests that the root of haughtiness is an excessive pre-occupation with one's own ego and lack of love and concern for others. Perhaps the reason for the prohibition of ‘arayot is to force an individual looking for a prospective spouse to leave his immediate family so as to unite a broader range of members of K'lal Yisrael in a familial bond of love and friendship. This in turn ensures greater cohesiveness in the Jewish nation. One who is haughty and self-centered violates this theme of "reaching out" inherent within the ‘arayot prohibitions. (Similarly, Maharal explains, the same Gemara states that it is as if he built a bama, an individual altar, once again indicating separation from the community. Also see Maharal for a different interpretation of the same passages in the Gemara.)
Rav S. R. Hirsch in his commentary to B'raishis (2:25), in a somewhat similar vein, suggests that at least the Noahide ‘arayot are prohibited so as to ensure character diversity within the couple. Relatives are more likely to have similar strengths and weaknesses. Seeking a spouse from a wider circle would ensure different, positive character traits which would more fully complement the composite husband-wife entity in their Divine service and, in turn, a conglomeration of these combined positive traits would be passed on to their children. In his commentary to Acharei-Mos, Rav Hisrsch suggests an additional reason applying to the broader spectrum of ‘arayot prohibited to Jews. The Torah wanted to assure that the physical aspect of marriage serve as an enhancement of the emotional and spiritual bond and not as a substitute for it. Consequently, the love-bond between husband and wife should not already exist long before the consideration of marriage as would be the case with close relatives for if this would be the case, there would be an inherent danger that the physical component of marriage would be a separate selfish, pleasure-seeking act unrelated to the total picture of the spiritual-emotional bond.
Perhaps, on a simple plane, the Gemara in Sota quoted by Maharal can be explained as follows. (The phraseology employed here is taken from Rav S. R. Hisrch's commentary. The interpretation of the Gemara is an extension.) The Torah, by prohibiting ‘arayot, elevates a physical activity which Man shares with the Animal Kingdom. Man, by surrendering to the Divine Will with his moral, free-will in this arena of physical activity and not following desire for instant, broad-based gratification, sanctifies such activity. A haughty individual fixated as he is on his own self and self-gratification and not the needs of others, does not absorb this message of viewing even activities accompanied by physical pleasure as a form not of self-service but of Divine service. Consequently, the Gemara compares such an individual to one who violates the ‘arayot prohibitions.
Parshas K'doshim ends the presentation of ‘arayot by reiterating the prohibitions against non-kosher food and concluding "V'Hiyisem li k'doshim" - "and you shall be Holy for Me" (20:26). What emerges then is that through controlling one's desires in surrender to the Divine Will while engaging in the two basic acts Man shares in common with the animals - eating and physical relations - one sanctifies himself by elevating even these seemingly mundane acts. Indeed, Rambam, by including precisely the prohibitions concerning food and forbidden relations in his Seifer K'dusha, highlights exactly this point. In a world permeated by unbridled, instant satisfaction and rationalization of base human desire, this message could not be more relevant.
The diversity of reasons given for this series of prohibitions serves to emphasize the enormous depths of the mitzvot of Hashem Yisbarach. Although the ultimate reasons for these and most mitzvot are hidden from us, the many insights offered by the Torah commentaries teach us an enlightening - even if only a small - glimpse as to how much Wisdom inheres within these commandments which constantly elevate us in revealed and hidden ways.