Answer:
Whitman had written a long poem and some of the readers might feel bored reading it, so he used this device to give some energy to it. Since anaphora is repetition, it keeps on getting in the mind of the readers thus giving emphasis to the ideas he expresses.