Theory:

What is Repetition?
Repetition is an act of repeating a word or phrase. It is commonly used to stress a point or to make a statement. It also helps in enhancing the general tone and style of the literary text. Hence, when used, repetition modifies both the form and the meaning of the text.
Definition:
According to J. A. Cuddon, repetition is “an essential unifying element in nearly all poetry and much prose. It may consist of sounds, particular syllables and words, phrases, stanzas, metrical patterns, ideas, allusions and shapes. Thus refrain, assonance, rhyme, internal rhyme, alliteration and onomatopoeia are frequent in repetition.”
The following is a famous speech from Shakespeare's Julius Caesar, spoken by Mark Antony. Shakespeare has used the rhetorical device known as repetition to deliver the message. The lines "Brutus says he was ambitious" and "Brutus is an honourable man" are examples of repetition, and one can easily see how the repeated lines had a positive impact and effect on the outcome of the speech.
Example:
Friends, Romans, countrymen, lend me your ears;
I come to bury Caesar, not to praise him.
The evil that men do lives after them;
The good is oft interred with their bones;
So let it be with Caesar. The noble Brutus
Hath told you Caesar was ambitious:

If it were so, it was a grievous fault,
And grievously hath Caesar answer’d it.
Here, under leave of Brutus and the rest–
For Brutus is an honourable man;
So are they all, all honourable men–
Come I to speak in Caesar’s funeral.
He was my friend, faithful and just to me:
But Brutus says he was ambitious;
And Brutus is an honourable man.

He hath brought many captives home to Rome
Whose ransoms did the general coffers fill:
Did this in Caesar seem ambitious?
When that the poor have cried, Caesar hath wept:
Ambition should be made of sterner stuff:
Yet Brutus says he was ambitious;
And Brutus is an honourable man.

You all did see that on the Lupercal
I thrice presented him a kingly crown,
Which he did thrice refuse: was this ambition?
Yet Brutus says he was ambitious;
And, sure, he is an honourable man.

I speak not to disprove what Brutus spoke,
But here I am to speak what I do know.
You all did love him once, not without cause:
What cause withholds you then, to mourn for him?

O judgment! thou art fled to brutish beasts,
And men have lost their reason. Bear with me;
My heart is in the coffin there with Caesar,
And I must pause till it come back to me.
The above speech has got various kinds of repetition in it, such as refrain, polyptoton, and anadiplosis. Apart from emphasising the meaning, the technique of repetition had also created an impact in the style by giving it rhythm.
 
Hence, repetition can affect both the form of the text as well as its meaning.
Why is the repetition important?
Repetition is important because it helps the speaker or author emphasise the important points. It also helps the audience or readers to understand the meaning of the poem or speech very easily.
Repetition used in the poem "The Shed":
There’s a shed at the bottom of our garden
With a spider’s web hanging across the door,
The hinges are rusty and creak in the wind.
When I’m in bed I lie and I listen,
I’ll open that door one day.
 
There’s a dusty old window around at the side
With three cracked panes of glass,
I often think there’s someone staring at me
Each time that I pass,
I’ll peep through that window one day.
 
My brother says there’s a ghost in the shed
Who hides under the rotten floorboards,
And if I ever dare to set foot inside
He’ll jump out and chop off my head,
But I’ll take a peek one day.
 
I know that there isn’t really a ghost,
My brother tells lies to keep the shed for his den;
There isn’t anyone staring or making strange noises
And the spider has been gone from his web
since I don’t know when,
I’ll go into that shed one day soon,
 
But not just yet...
Reference:
Cuddon, J.A. A Dictionary of Literary Terms and Literary Theory. West Sussex, Wiley-Blackwell Publication, 2013.
 
https://www.poetryfoundation.org/poems/56968/speech-friends-romans-countrymen-lend-me-your-ears
 
National Council of Educational Research and Training (2007). Honeycomb. The Shed: Frank Flynn (pp. 48 -49). Published at the Publication Division by the Secretary, National Council of Educational Research and Training, Sri Aurobindo Marg, New Delhi.