The poem uses anaphora in lines 7 and 8, though the polysyndeton (the "ands") of lines 3 through 6 is a type of anaphora too.
The anaphora works (along with the polysyndeton) to create an atmosphere of intense perseverance throughout the entire poem. One of the poem's main points is that hope is almost impossible to defeat, which is why it is so important to humanity—indeed, hope is most useful when times are hardest. The repetitive line beginnings, then, evoke strength—the ability to push on one from moment to the next without losing any momentum. Indeed, lines 5 through 8 have to literally weather the storm that they describe, with the "ands" and "thats" working like anchors steadying a ship.
In fact, "ands" and "thats" form the beginnings of eight out of the poem's twelve lines—two thirds of the entire poem. Apart from the first line, which works as an introduction, and the lines in the final stanza that deal with the speaker's personal experience, every line is anaphoric. In other words, anaphora is everywhere—just like hope.
There is another way of looking at this anaphora, too. Part of the "Hope" bird's power is in its song, which is a symbol of joy, beauty, and strength. Since one way of defining music is by thinking of it as the patterned organization and variation of sound, then the anaphora can be read as part of the bird's melody too. That is, it helps the lines combine repetition and variation in much the same way that real birdsong might.