It says sur mayra vaasey tov, first turn away from bad, and THEN, and only then, do good. What does this mean for us? It means that you can't start enjoying the benefits of what a clean life means if you're still acting out. So in the 12 step groups, they want you to be sober BEFORE you start working the program. Rabbi Twerski gave me advice to turn to the Torah instead of lust (here and here). But I couldn't begin to see how Torah would replace the lust until I was clean for a time. Now, after almost 3 years clean (with only a small number of slips), I am only BEGINNING to realize how spirituality can replace the tremendous physical pleasure in lust.
The Torah can't work its magic until we are sober. And the way to get sober from the disease of addiction is NOT through the Torah, it is through group support and hard, hard work. Only after we begin this work, can we begin to appreciate the Torah's greatness.