There is a famous Sufi fable (Story 5, Golestan of Saadi) of Shaikh Saadi. In this story,
Instead of punishing with capital punishment, the caliph released a young innocent-looking dacoit on a kind minister's request and put him on probation under supervision of that minister. That boy exhibited good results under the cultured environment, but soon he returned to his old nature, and started sitting in the bad company. He fled after killing the kind minister, and returned to the same abode of robbers where he used to reside previously.
Shaikh Saadi has discussed the fact that it is useless to make efforts on changing someone's nature, because he will easily return to his old traits.
Restraint
"Haya" (or shame) plays an important role in survival. It is a contant of faith, as an Islamic tradition pronounce 'the shame is a part from faith' (Al-hayau minal Eiman). It creates a reluctance in the beginner, and responsibility in the penitent.
Punjabi language has an idiom: "the reveal is fallen" (Jhaka Lath Jana). If first time is done, then second time will be easy, and without reluctance. It is very easy for a previously habitual to revert to his old activities. He must have a strong faith and will power!

The best of crises is that of love and the pain of it. It may bring a change in human nature.
Which annuls the danger and provides a way of escape.
Sell your cleverness and buy bewilderment.
Cleverness is mere opinion, bewilderment intuition.
~ Rumi
Keh tere behr ki mojon main izterab naheen.
Tujhe kitab say mumkin nahin faragh keh too
Kitab khawan hay magar sahib-e-kitab nahin.
~ Iqbal
for the currents of your sea are devoid of agitation.
The book (Quran) cannot be your salvation,
for, you are only its (mere) recitalist; not a man-of-book (or, never followed or acted on it).
Zeaatish-e-khud soz agar dari dilay
~ Iqbal
Have you a heart?
Gham makhur under zameerey khud niger
~ Iqbal
you the trustee is oblivious of the great treasure that has been bestowed upon you, Don’t despair, look inward, to see what lies within you.
Invitation to Change: The Sufi Principle of Acceptance, love and generosity:

It was famous saying that no one go back empty-handed from the generous threshold of a Shaikh. A thief once broke into a Sufi Shaikh 's home. The Shaikh caught him red handed. The generous Shaikh did not wanted him go empty-hand, but his home had nothing as valuables. Only a thing he could give was 'the status of the Qutb' (the highest-ranking saint, the focal point of all spiritual energy). He made a thief the Qutb of time.
They never refuse anyone. They invite the people to Allah. They love everyone and impart to anyone, who asks for the freshness of wisdom, spiritual peace and cordial satisfaction.
Wonderer, worshipper, lover of leaving.
It doesn't matter.
Ours is not a caravan of despair.
Come, even if you have broken your vow
a thousand times
Come, yet again, come, come.
~ Rumi