"Be not deceived," the Apostle Paul taught. "God is not
mocked: for whatsoever a man soweth, that
shall he also reap.
For he soweth to his flesh shall of the flesh reap
corruption; but he that soweth to the Spirit shall of the
Spirit reap life everlasting."
In other words, if we indulge in drugs or pornography or
other evils that the Apostle called sowing to the flesh,
eternal law dictates that we harvest corruption rather than
life eternal.
That is the justice of God, and mercy cannot rob justice.
If an eternal law is broken, the punishment affixed to that
law must be suffered.
Some of this can be satisfied by the Savior's Atonement, but
the merciful cleansing of a soiled sinner only comes after
repentance, which for some sins is a prolonged and
painful process.
Otherwise, "he that exercises no faith unto repentance is
exposed to the whole law of the demands of justice,
therefore only unto him that has faith unto repentance is
brought about the great and eternal plan of redemption."