As the title Twelfth Night suggests, the play was written for an Epiphany celebration held at one of the Inns of Court in 1602. Epiphany is celebrated as the moment when the Magi, or three wise men, brought their gifts to baby Jesus. While one would think that Epiphany parties would relate to Christmas traditions, apparently the parties could be "absolutely secular and even quite bawdy" ("Introduction to Twelfth Night"). The particular party Shakespeare wrote the play for apparently had a reputation of being a "time of masques, revels, defiance of authority, and general foolishness" ("Introduction"). As we can see from the events and themes of the play, Shakespeare's Twelfth Night is a perfect spoof on the activities that were characteristic of that festive night. Foolishness and bawdy behavior is represented by the antics of Sir Toby, Sir Andrew, Maria, and Fabian. Plus, even Olivia and Duke Orsino are proven to have their fair share of foolishness. Olivia is proven foolish for her mourning, and Orsino is proven foolish for his obsessive love. In contrast, Feste, the fool or court jester, ronically proves to be the only one who is not foolish. He stands above the foolery and wisely critiques it in his witty way. As one critic phrases it, "Feste functions as commentator and analyst" who reveals truths about the other characters and about reality in general ("Feste and Fabian:Plots and Complots"). Hence the purpose of Feste's final song is to make one final comment on reality. Throughout the play, all of the antics and foolery have been comic and fun, but now with Feste's final song, we are reminded that foolishness is not only prevalent in the world, but also that it's a part of what makes the real world so harsh.
The harshness of reality is especially seen in the two refrains found in the song, "With a hey, ho, the wind and the rain" followed by "For the rain it raineth every day." The wind and rain are harsh elements of nature, which can even be destructive. What Feste is saying here is that the harsh element of rain is a metaphorical daily occurrence, making the harshness of life a daily occurrence. Foolishness is referred to throughout the song, especially in the opening verses in which he sings that when he was a "little tiny boy / ... A foolish thing was but a toy," meaning that he naively thought of foolishness as a play thing, just like Maria and Sirs Toby and Andrew (V.i.401-02). His references to knavery, thievery, and drunkenness also further tie directly back to the antics of the play. However, while the song has a much sadder and realistic tone than the rest of the play, he ends his song with the lines, "But that's all one, our play is done, / And we'll strive to please you every day," reminding us that Shakespeare is an entertainer, and even comic irony can be found in the harsh realities of every day life, making reality humorous (418-19).