A common way of explaining karma is by using the idea of bija. A bija is a “karmic seed”. We can think of karmic seeds as planted in the ground of the mind. A seed can stay in the ground for a long time before the conditions arrive that enable it to sprout. In the same way, karmic seeds can lodge in the mind waiting for the provocation or stimulation that will make them spring into action.
Thus, one might have a seed of anger. At some point in time the trigger for this seed occurs. Perhaps somebody insults one. The anger seed germinates and one feels the upsurge of anger. Now at this point, momentarily, there is a choice. One can go with the rising feelings or one can avert the sequence. This moment of freedom usually is brief. If one does not take the option to avert, then the usual sequence of events will unfold, one will become angry and conflict with ensue. One will come away from the interaction seething with negative affect.
Now there are two important points here. One is that even though karma is inexorable, there is, within it, always a window of freedom. The other is that, in this analogy, the old seed is exhausted. It has ceased (vipaka), but because one became angry again new seeds have been sewn. So one emerges from the situation with the same kind of seed - perhaps more of the same - in one’s alaya. The alaya is the accumulation of seeds, or, by extension, the part of the mind where all these seeds are stored (just as the word "store" can mean the things kept or the place where they are kept).
If, on the other hand, one had interrupted the sequence, the seed from the past would have still sprung up but no new seeds would be planted. Thus, one would still feel the anger, but by not acting upon it one would diminish the propensity to become angry in the future by reducing the quantity of anger seed in the alaya.
Now, of course, we have innumerable seeds already in the alaya so one cannot really know what might pop up next, but the theory does give quite a good picture of how restraint works. If one restrain an impulse, one still feels the force of that impulse at the time. If one restrain it repeatedly, the occasions upon which it comes forth become fewer and further between. Restraint does not bring instant results but it does gradually lead to a stronger character and a more peaceful mind.
In a more profound way, the experience of such arising (samudaya) can be a basis for useful insight and wisdom. If I am prone to it, then I can gain a sense of how it is for everybody else, including those who have very different outlook on life from myself. We are all human and all have a karmic history. From a certain point of view we are nothing but our karmic history. If I can profit by learning from my experiences of losing self-control in this way, I can gain a much deeper understanding of human nature and this can be the foundation of real compassion in the form of fellow feeling. We are all in the same boat, all subject to the same plight as being children of our karma.
Even more profoundly, the moment of freedom is a glimpse of nirvana. It is a quantum of bliss. It is past in an instant, but that instant is like a miracle. In that moment one is completely alone, detached from the provocative stimulus. The sense of "I don't have to," is freedom. Tolstoy once commented on Lao Tzu saying "Every disaster distressing to human beings arises not from neglecting to do something necessary but from doing something unnecessary." There is much truth in the notion that most of our difficulties are self-inflicted. When our lives are simple, we complicate them. When things are going along smoothly we get bored. We have an incorrigible tendency to stir things up. The old pattern returns and returns and we fail to see the disadvantage.
Buddha emphasised restraint because he realised it is an important element in breaking free from the effects of recurring karma and also because noticing our own freedom is a step toward the bliss of awakening.