The repetition technique is usually used by poets to draw more attention to the idea and topic that they want to relay. In "There was a child went forth", the author uses the technique at the start and at the end of every stanza.
The reasone poets repeat ceartin phrase mutiple times is so that phase will have a spotlight over it so the reader or veiwer may undertand the topic that the reader or vewiwer is trying to potray.