Kedoshim - Creating a Legacy

Towards the beginning of the parshah there is the verse:

Every man shall fear his mother and his father, and you shall observe My Sabbaths. I am the L-rd, your G-d.
Vayikra 19:3

It is a very interesting placement for this statement. Immediately following the over-arching commandment to "You shall be holy" (19:2), and looking on a wider scale, this verse is positioned at the heal of the previous parsha, the list 'araiot' - the forbidden relationships.

What is the connection to fulfilling the commandment to 'be holy' and why should this fall so close to the long and detailled list of forbidden relationships?

Connection Between Temptation and Parents
The Orach HaChaim HaKadosh addresses this issue. First he notes that there is a special connection between our parents and the temptations that we face. He brings the example of Yosef HaTzadik when he faced his key test, remaining strong against the advances of the wife of Potifar. The Gemorah in Masechet Sotah (36B) explains that Yosef had a vision of his father at this moment. In the vision, Yaacov says to Yosef that in the future there will be a breast plate.

Yosef's Vision
And she caught him by his garment, saying etc.  At that moment his father's image came and appeared to him through the window and said: 'Joseph, thy brothers will have their names inscribed upon the stones of the ephod and thine amongst theirs; is it thy wish to have thy name expunged from amongst theirs and be called an associate of harlots?' (As it is written: He that keepeth company with harlots wasteth his substance.) Immediately his bow abode in strength20  — R. Johanan said in the name of R. Meir: [This means] that his passion subsided. And the arms of his hands were made active  — he stuck his hands in the ground so that his lust came out from between his finger-nails. 'By the hands of the Mighty One of Jacob'  — Who caused his name to be engraven upon the stones of the ephod but the Mighty One of Jacob? 'From thence is the shepherd, the stone of Israel'  — from there was he worthy to be made a shepherd, as it is said: Give ear, O Shepherd of Israel, Thou that leadest like the flock of Joseph.
Sotah 36B

The Orach HaChaim HaKadosh explains that the great legacy that Yosef is known for, having resisted the temptations of the wife of Potifar, was inspired by the vision of his father.

Envision Your Parents
Here this is how he explains the significance of the verse in our parshah, that the positioning of this verse is meant to provide us a source of inspiration in our lives, and in our struggles. That we should use the vision and memory of our parents to strengthen ourselves in the ongoing battle against temptations - hence the closeness of this verse to the list of illicity relationships.

Become the Vision
However I would take this a step further. Just as the vision and memory of our parents can impact our own lives, so also we can look the other way towards our children, the next generation, and we should be particular about our own conduct. For the actions and decisions that we take and make in our lives, can serve as an inspiration and impact the generations to come. Instead of just emulating Yosef in his strength, we can strive to become the vision of Yaacov that inspired Yosef.

Achrei Mot - The Essential Characteristics for Overcoming Desire

"Speak to the children of Israel, and say to them: I am the L-rd, your G-d."
Vayikra 18:2

Main Question
The Orach HaChaim asks what new insight comes from the phrase "I am the Lo-d, your G-d."?

While in the next verse it says:
"Like the practice of the land of Egypt, in which you dwelled, you shall not do, and like the practice of the land of Canaan, to which I am bringing you, you shall not do, and you shall not follow their statutes."
Vayikra 18:3

He explains that this mitzvah [not to behave like the Egyptians or the Canaanites] was positioned immediately proceeding to the list of illicit relationships in order to relate to another verse later: 

"You shall not defile yourselves by any of these things, for the nations, whom I am sending away from before you, have defiled themselves with all these things"
Vayikra 18:24

Since around all of these illicit actions, other nations impurified themselves, it further emphasizes how the base behavior of Egypt is like the low behavior of the inhabitants of Canaan. 

So how do these issues resolve the initial question of why the introduction to the section of illicit relationships starts with the announcement "I am the L-rd, your G-d." ?

Only What We Are Capable Of
He continues, explaining that it is known that all the commandments that G-d gave to his holy nation that these are commandments that people are capable of fulfilling and that they can bend themselves to the will to accomplish these commandments. 

Except for the commandment to separate yourself from illicit relationships, this is something that man's soul craves and drives man to do them. 

Essential Aspects to Distance From
That which prevents us from acting on these desires comes from distancing ourselves from 2 things:
- to distance yourself from what you see
- to distance yourself from what you think

And if these two aspects are not held in check, then no man can stay in control of his urges. 

To further support this we learn the following incidents.

R. Amram Screams Fire
Kiddushin 71A
Certain [redeemed] captive women came to Nehardea. They were taken to the house of R. Amram the Chasid, and the ladder was removed from under them. As one of the women passed by, a light fell on the sky lights; [thereupon] R. Amram seized the ladder, which ten men could not raise, and he alone set it up and proceeded to ascend. 
When he had gone half way up the ladder, he stopped his feet and cried out, ‘A fire is at R. Amram's!’ 
The Rabbis came and reproved him, ‘We have shamed you!’ 
Said he to them: ‘Better that you shame Amram in this world than that you be ashamed of him in the next.’ 
He then commanded it [the Evil Inclination] to leave him, and it went out from him in the shape of a fiery column. 
Said he to it: ‘See, you are fire and I am flesh, yet I am stronger than you.’

R. Mattia Ben Cheresh Faces Satan
Yalkut Shimoni 147/161
The incident of Rabbi Mattia Ben Cheresh.
The Satan went and found Rebbe Matia imbersed in Torah. So he appeared to him in the guise of a beautiful woman, the like of which there had not been in the world.
The Satan stood before Rabbi Mattia ben Cheresh, who turned his face the other way. He stood to his left, and he turned to the right. He stood to his right, and he turned to the left. He then began standing all around him, until finally Rabbi Mattia ben Cheresh thought: “I’m afraid that the evil inclination will overcome me and I will sin.” What did this tzaddik do? He summoned a student and said, “Bring me a flame and some nails.” He brought him some burning nails, which Mattia ben Cheresh used to gouge out his own eyes. 
When the Satan saw this, he was stunned and fell backwards. At the same time, Hashem summoned the angel Raphael and said, “Go heal Mattia ben Cheresh.” The angel stood before Mattia ben Cheresh, who asked: “Who are you?” He replied, “I am Raphael. Hashem has sent me to heal you.” He said, “Leave me be. What is done is done.” The angel returned to Hashem and said, “Master of the universe, this is what Mattia told me.” Hashem replied, “Tell him that I will ensure that the evil inclination will never control him.” The angel then healed him.

Control Sight and Thought
So we learn from these cases of the power of sight and thought, where both must be controlled. This is the power of thought, for without having actually seen a lustfull object, but mere thought can bring one to be desirous. These two aspects, sight and thought make man weak in the face of his base desires. 
It goes without saying, if one extends his hand and takes just a little bit from the forbidden, so he has now been dragged towards his passion. Even the small tastes bruise a man and draw out his battle againsts the evil inclination. 
Only by nullifying these two aspects can man come to be in true control of his behavior, and in accordance of his natural desires. 

Baalei Tshuvah Knows More
And so the Or HaChaim concludes with the statement from Brechot 34B.

For R. Abbahu said: In the place where Baalei Tshuvah stand even the wholly righteous cannot stand, as it says: "Peace, peace to him that was far and to him that is near." (Isaiah 57:19)

That is to say the wholly righteous overcome desires without ever having knowing the forbidden, but the Baalei Tshuvah distance themselves from the forbidden despite having tasted of it and desiring it. 

Thus it says "I am the Lord, your G-d." so as to remind you to live in the way your soul was created. That G-d placed the light of His contenance in man. And so there is power in man to to be victorious over desire before G-d.