Iyov I
Abraham “…was sitting at the opening of the tent,” referring to [our sages' statement] that he sits at the entrance of Gehinom and keeps whoever is circumcised and sealed with the holy covenant and has not blemished it from entering. (Eruvin 19a)
Abraham was the first Jew to be circumcised, and the covenant of circumcision is known to this day as “the covenant of Abraham”. Thus, whoever fulfills the commandment of being circumcised and guards the purity of his sexuality merits Abraham’s protection. Allegorically, this simply means that guarding sexual purity is sufficient merit to be spared the ordeal of Gehinom even if one has sinned in other ways that would have otherwise required that he undergo the purging process.
Now, this caused Terah to be reincarnated. When he returned, he descended as a woman and married according to leviratic law.
I.e., she married the brother of her deceased, childless husband. In such a case, the first child of this union is considered the child of the deceased man. Although Terah repented of his sin of idolatry before he died, he evidently had to be reincarnated in order to right his sexual sins. He thus descended as a woman – presumably to experience female consciousness and thereby realize the seriousness of having “used” women. As a woman, s/he suffered being childless and losing her husband. S/he then had to marry the deceased husband’s brother.
The key to the rectification of Terah’s sexual sins was the sexual purity and idealism of his son, Abraham. The fact that Abraham (re-)introduced the idea of sexual integrity into the world allowed Terah’s soul to be set straight.
