This is a nice Twitter thread:
This line is so memorable for a reason.
— The Cultural Tutor (@culturaltutor) August 21, 2022
It's a perfect use of antimetabole: the repetition of a phrase in successive clauses, but with its word order reversed.
Here are 8 more rhetorical devices to make your writing or speaking more memorable: pic.twitter.com/orYXa3jTZp
Polyptoton The repeated use of words with the same root, like destroy, destroyer, and destroyed.
Anadiplosis The repetition of the last word of a clause at the beginning of the next.
Anaphora The use of the same word or words at the start of successive clauses or sentences.
Epizeuxis The immediate repetition of a word or phrase.
Epanalepsis The repetition of a word at the start and end of a clause.
Antithesis The use (and contrast) of two opposing ideas in a single clause or sentence.
Aysndeton The omission of a conjunction (e.g. and, or) from a series of related clauses.
Anastrophe The inversion of normal word order.
Read through the entire thread by @culturaltutor to see examples.