While President Kennedy's use of repetition can serve multiple purposes, the most fitting response to the question posed is:
to create unity among all of his listeners.
Repetition often helps to reinforce shared values and rally people together around a common cause, which aligns with Kennedy's themes of unity and collective action in his speech.