The following 2 definitions of anaphora are from the Oxford Living Dictionaries.
The use of a word referring back to a word used earlier in a text or conversation, to avoid repetition, for example the pronouns he, she, it, and they and the verb do in I like it and so do they.
The repetition of a word or phrase at the beginning of successive clauses.
Why does the "grammatical anaphora" do the opposite of what the "rhetorical anaphora does"? In other words, why does the "grammatical anaphora" avoid "a carry back" (etymological meaning of 'anaphora') when rhetorically it carries back words, phrases or clauses?
"repetition of a word or phrase in successive clauses," 1580s, from Latin, from Greek anaphora "reference," literally "a carrying back," from anapherein "to carry back, to bring up," from ana "back" (see ana-) + pherein "to bear," from PIE root *bher- (1) "to carry." (Online Etymology Dictionary)