The main purpose of Shakespeare's Sonnet 18 is embodied in the end couplet:
So long as men can breathe or eyes can see,
So long lives this and this gives life to thee.
The sonneteer's purpose is to make his love's beauty and, by implication, his love for her, eternal. In doing so, he takes a rather circuitous pathway by beginning with a comparison that does not describe her.
In the first two quatrains, he is essentially saying, "No, I cannot compare you to a summer's day, and here's why." The last two lines of the first quatrain,
Rough winds do shake the darling buds of May,
And summer's lease hath all too short a date:
along with the whole second quatrain (four lines of poetry with alternating rhyme) explain why she can not be compared to a summer's day. For instance, "rough winds" do not shake her beauty and her beauty is not sometimes dimmed as even the mighty sun's glory is sometimes dimmed:
[that] too hot the eye of heaven shines,
And often is his gold ... dimm'd;
The third quatrain, beginning with the contradictory conjunction "but," begins the explanation that leads up to the main purpose expressed in the ending couplet (two rhyming lines of poetry). In this final quatrain, the sonneteer says "But ..." your beauty shall be an "eternal summer" and shall not fade nor be dimmed so that even Death shall not rob your beauty.
Then comes the implied "because" of the couplet that explains that as long as Sonnet 18 can be read, then she will have beauty and she will have life eternal.
The main purpose of “Sonnet 18” is to present the extreme contrast between the immense beauty of the speaker’s love for an unnamed subject and the beauty of summer, which fades once summer is over. The speaker essentially states that even though there are very positive similarities between his love and summer, the love that he possesses is without boundaries. The speaker contemplates the comparison in the first two octaves, but comes to the conclusion that while summer ends, his love is immortal. At the volta (line 9- also known as “the change”), he morphs his lover into an eternal summer one which does not end, and lasts throughout the history of humanity. The sonnet is particularly romantic considering that Shakespeare sums up the sonnet, in the rhyming couplet, by saying that his love will exist for as long as humanity exists, and that while his love will be universal through time, it will also be the perpetuating force that drives humanity. Considering that, as we know it, the concept of love has been around since the inception of humanity, the logical progression that it will thrive throughout humanity is not that far of a stretch. The flattering motion produced by Shakespeare isn’t really that love is immortal, but rather that his love for this one person will be immortal, and the springboard for love to come.