The story of Arahant bikkhuni Isidasi in the scriptures, is a good example of karma and sexual misconduct independent of the lay precepts. She became aware of the secret of the cause of her suffering only after she attained Arahantship.
She realized seven births prior to her current birth she had being born a male. During that life he had molested young girls. After his death he was born in hell. He suffered in hell for a considerable period of time. Next he was born a monkey. Attacked by an older monkey he was wounded. The wound festered. The festered wound did not heal for a long time and finally died after much suffering. His ‘kamma’ was not over. He was born a goat, next a cow and suffered similar fates. Thereafter he was born a human being. He was born a female. Her mother was a low caste poor servant. One day debtors took the young girl away from the mother. Her life ended thus. Finally she was fortunate to be born during the time of the Buddha and was liberated from the sufferings of ‘samsara’. Thus we all should realize that we should reform our inner selves by conforming to the Dhamma if we are to attain liberation.
The Buddha taught us that one finds a faithful, loving and committed spouse as a result of their past actions. Those who did not engage in sexual misconduct, and those who stayed faithful to their husbands and wives in their past lives, in turn receive loving and faithful spouses in their prospective lives. But those who engaged in sexual misconduct in their past lives face results of their unwholesome actions in their present or future lives. Hence, the Buddha advised us to restraint from engaging in sexual misconduct and to cultivate love and faithfulness to one’s partner.