In all Shakespeare's comedies, the happy endings where all the characters fall neatly into place, joyously united with some lover, always for me have a poignancy about them that is bittersweet. The hero and heroine get the best deal, with the most romantic and catching love story, and lesser characters are tidied up with, it feels to me, the overriding purpose of boosting the rosiness of the outcome for the lead couple (or sometimes couples of equal stature).
Count Orsino's rapid switching of affections from Olivia to Viola is intended to jar I think, even considering his nature of being in love with love, and to illicit in the audience a feeling that perfect love stories can only be a fantasy. In all the comedy plays, the snapping into place of the couples gives us a jolt, or a nudge at least, that we are witnessing a dream sequence. In reality, for real people, feelings could not switch so rapidly and conveniently. We know deep down that the B (or C, or lower) characters have not got the top prize, and will never be center stage. This is true to life for ordinary people. As an audience we are elated that Olivia has found her Sebastian, through a series of exciting twists and turns, but Shakespeare reminds us with the suddenness of the convenient pairing of Orsino and Viola that not everyone can achieve their goals and that this is a universal sadness.
Viola appears on the face of it to have the dream outcome that Olivia has, winning Orsino against the odds of him being in love with Olivia. Perhaps in coming to know her, Orsino will love her for her personality, which has already begun with knowing her as Cesario. Equally though, Viola could come to falling out of love with Orsino when the reality of his character finally settles. It is a story that isn't finished, and if we look closer we can see how it could go wrong. Indeed, the same applies for Olivia when we consider the reality that twins are not exactly the same in character. Sebastian may be a copy in looks, but why so also in nature? If we realize this, then we see that even the lead couple may have unhappiness in store.
Olivia and Sebastian get the top prize, with timing that suits Olivia's story. Viola wins her much-loved Orsino, but only in the nick of time. There is definitely a tinge of sadness to consider that the heroine wins out in getting her hero, when the stories for others are less neat and even sacrificed for the sake of the lead characters. If we go further on these lines, we realize the play and our love of romance are the real winners, and that even the lead characters may have a hollow victory at the expense of a ripping yarn and good theatre. The poignancy of this is beautiful and is the essence of the comedies that is truly captivating.
At the conclusion of Twelfth Night, Viola sheds her disguise as the young officer Cesario, Duke Orsino instantly drops his opposition to her (and her twin brother Sebastian's) love for Olivia and then "switches" his affections to a young woman whom he has thus far known only as a man. The gender confusion aside, this turnabout seems extremely odd, for Orsino has doggedly pursued his Olivia, praising the singularity of her character and charms. From the outset of the play we are directed to the fickleness of Orsino's moods, as when he first orders music to accompany reverie over Olivia and then suddenly commands it to be stopped. Although seemingly steadfast in his suit for Olivia, by end of first scene we realize that Orsino is not truly in love with Olivia; rather, he is in love with his own role as an irrational lover immersed in a romantic reverie. Indeed, Orsino openly boasts of his "unstaid and skittish" conduct, which he displays as a symptom of his self-exalted status as a romantic lover.