This is an excellent question, but a challenging one. There are apparently many different purposes for the speaker to be repeating some of the phrases and lines in the poem.
First of all, this poem has no rhymes and no meter. It is arranged in stanzas and looks like a lyric poem, but there is nothing lyrical about it, and the only "poetic" elements are the repetitions of certain phrases and lines, as is done, for example, in such poems as Edgar Allan Poe's "The Raven" and Dylan Thomas's "Do Not Go Gentle into That Good Night." Rhymes and meters are both repetitious, and the repetitions of phrases and lines in Henry's Reed's poem may be intended to serve as substitutes or even illusions. It is a grim poem about war and killing disguised as a lyrical poem.
The repetitions of phrases and lines also suggests the tedium of basic training, in which every man wears an identical uniform and repeats the same movements over and over. Army life is about everybody doing the same thing at the same time and not thinking. The speaker is secretly disobeying by thinking his own thoughts instead of concentrating on memorizing the names of all the parts of the weapon he hates having to carry and dreads having to use.
The same words are repeated because (1) they are being heard by the draftee who is the speaker, (2) because he is repeating them to himself in his head, knowing that he had better remember them if he wants to avoid serious trouble, and (3) because he is sensitive and intelligent and cannot help seeing how the naming of rifle parts ironically describes parts of the beauties of nature he sees around him--flowers, trees, bees. It is ironic that they are going through this deadly routine in an area surrounded by beautiful, peaceful English gardens.
Glistens like coral in all of the neighboring gardens,
And to-day we have naming of parts.
Hold in the gardens their silent, eloquent gestures,
Which in our case we have not got.
There is a certain sad, wistful, sarcastic humor in the poem, which probably accounts for its being so often anthologized. The men have no silent, eloquent gestures because they have to stand there motionless, wishing they were anywhere else in the world.
In mentally contrasting the parts of a killing weapon with the simple and harmless joys of nature, the speaker is implicitly comparing the wickedness of man with the innocence of nature. The speaker is a draftee. He doesn't want to be where he is. He doesn't belong here. But there is nothing he can do about it. Some men like military service, but during a big war every type of man--including artists and poets--is dragged into the military machinery and turned into an automaton and a killer. "Naming of Parts" is a gentle protest against the dehumanization of war.
Henry Reed served in the British army during World War II. He published this poem in 1946, but it was obviously written earlier, probably around 1942 when he was drafted, and not published until after the war ended because of its censorable anti-war sentiments. It is somewhat reminiscent of other post-war works such as J. D. Salinger's stories "For Esme--With Love and Squalor" and "Just Before the War with the Eskimos," as well as Norman Mailer's The Naked and the Dead and Neil Simon's play Biloxi Blues, made into a movie in 1988.