When you repeatedly expose yourself to a similar pleasurable stimulus, the pleasure side gets weaker and the pain side gets stronger. Scientists call this neuroadaptation.
The reason people relapse even after sustained periods of abstinence is the pain-pleasure balance. When the scales are tilted to the pleasure side for a long time, we crave the pleasure just to feel normal. But if we wait long enough, the brain will readapt to the baseline.
The pursuit of pleasure for its own sake leads to an inability to enjoy pleasure of any kind. A dopamine-deficient state drives craving and seeking out reward.