Boundaries of arayos reveal kedushah
kedushah · arayos · boundaries · Divine order · chelek Hashem
וברש"י כ"מ שאתה מוצא גדר ערוה אתה מוצא קדושה כו'.
And in Rashi: wherever you find a fence guarding against arayos (forbidden relations), there you find kedushah (holiness)…
The Sefas Emes cites Rashi's principle that holiness is found specifically where a person sets up boundaries against immorality.
פי' ג"כ כנ"ל כיון שבנ"י מיוחדין להשי"ת.
The explanation is also as above: since Bnei Yisrael are uniquely bound to Hashem.
Bnei Yisrael have a special, exclusive relationship with Hashem — they are set apart as His own.
ושמירת עריות הוא לשמור חוק הש"י.
And the guarding against arayos is the keeping of Hashem's decree.
Refraining from forbidden relations is precisely a way of preserving the order and "law" that Hashem established in creation.
כל דבר ומין למינהו.
Each thing and each species according to its kind.
Hashem built the world so that every thing keeps to its proper category — "each according to its kind" — and arayos is a violation of that Divine order.
וממילא כשכ"ד יהי' במקומו ממילא מדרגת בנ"י הם להיות חלק ה' ונחלתו כנ"ל:
And consequently, when each thing is in its proper place, automatically the level of Bnei Yisrael is to be the portion of Hashem and His inheritance, as above.
When everything is kept within its rightful boundaries, Bnei Yisrael naturally rise to their true madreigah (level) — being "the portion of Hashem and His inheritance," bound to Him as His own.
Summary: Holiness is found precisely where a person fences himself off from arayos, because Bnei Yisrael are uniquely Hashem's own. Guarding the boundaries of "each according to its kind" preserves the Divine order of creation, and when everything stays in its proper place Bnei Yisrael attain their true status as the portion and inheritance of Hashem.