More specifically, they are examples of repetition:
* Anaphora is the repetition of a word or phrase at the beginning of successive clauses or sentences.
* Epistrophe is the repetition of a word or phrase at the end of successive clauses or sentences.
Both anaphora and epistrophe are used to create emphasis, rhythm, and a sense of unity in writing and speech.