From Schoenberg’s Harmonielehre:

Two impulses struggle with each other within man: the demand for repetition of pleasant stimuli, and the opposing desire for variety, for change, for a new stimulus. These two impulses often unite in one relatively common impulse characteristic of beasts of prey: the impulse to take possession. The question whether then repetition or change shall follow is for the time being cast aside. The more robust satisfaction the consciousness of possession gives, with its possibilities for deciding this way or that, is capable of suppressing the subtler considerations and of leading to that conservative repose which is always characteristic of ownership. Faced with the dilemma, whether repetition of the stimuli or innovation be preferable, the human intellect decided here, too, to take possession; it founded a system.

Thus it can also be imagined how the chance occurrence of a dissonant passing tone, once established by the notation, after its excitement had been experienced, called forth the desire for less accidental, less arbitrary repetition; how the desire to experience this excitement more often led to taking possession of the methods that brought it about. But, should the excitement of the forbidden lead to uninhibited indulgence, that essentially despicable compromise between morality and immoderate desire had to be drawn, that compromise which here consists in a looser conception of the prohibition as well as of that which is prohibited. Dissonance was accepted, but the door through which it was admitted was bolted whenever excess threatened.

The treatment of dissonance, in which psychological and practical considerations play similarly decisive roles, could have arisen in this manner. The caution of the listener, who wants to enjoy the excitement but does not want to be too greatly alarmed by the danger, is in accord with the caution of the singer. And the composer, who dares not spoil it for either, invents methods that pander to this goal: how do I hold the listener in suspense, how do I startle him and yet not go so far that it is no longer possible for me to say, ‘It was only in fun’? Or: how do I introduce, slowly and carefully, what indeed has to come if I do no not want to bore the listener; how do I persuade him to accept the sour grapes, too, so that the sweet ones, the resolution of the dissonance, will stimulate him so much the more pleasantly? How do I induce the singer to sing a dissonant tone in spite of himself, in spite of possible intonation difficulties? I do not let him notice its entry and I whisper to him in the catastrophic moment: ‘Easy! It’s practically over.’ Careful introduction and euphonious resolution: that is the system!

Preparation and resolution are thus a pair of protective wrappers in which the dissonance is carefully packed so that it neither suffers nor inflicts damage.