When a person decides that he will sin and afterward repent, he makes the assumption that he will have the time to do so.
And because he is always sure that he will have time in the future to repent, he will always see himself as having the chance to commit another minor transgression in the meantime.
The very assumption that he will be able to repent after he sins prevents him from repenting.
We can understand this behavior by comparing a time in a person's life when everything seems possible–and as a result, he does nothing.
Because he knows that the door of opportunity is open, he never bothers' to walk through it.
But if, after having committed a sin, a person is so upset that he cannot look at himself in the mirror, if he feels that he cannot continue to live with himself, then he has no time to commit another transgression.
He feels that he must atone this instant.
He feels that he has been flung deep into the abyss, that he cannot climb out, that he does not know how he will live his life.
And just because he feels this way, he will seek any crack as small as the eye of a needle, and he will open it as wide as a palace gate.
–Rabbi Adin Steinsaltz
From Learning from the Tanya by Rabbi Adin Steinsaltz