I would like to think of it as two roads.
The learning by heart is one where you have to go on an adventure and feel which path is the correct. Learning by route is like a road with signs telling you were to go. You remember something that feels connected to you versus what doesn't feel as attached.
Think of it this way. I had to recite as much of the Gettysburg Address to my class in the 5th grade (the more I can recite, the better the grade.) In 5th grade, I was able to recite almost all of it. These are the lines I can still remember after all these years.
Four score and seven years ago our fathers brought forth on this continent a new nation
conceived in liberty
and dedicated to the proposition that all men are created equal
Now we are engaged in a great civil war
testing whether that nation
or any nation
so conceived and so dedicated
can long endure.
[There is a few lines I've skipped because I'd forgotten them]
But
in a larger sense
we can not dedicate
we can not consecrate
we can not hallow
this ground. (bold part is the most powerful for me)
Everything else has come and go after all these years, but I would think most people are only familiar with four scores and seven years ago. (as it is a classic Abe Lincoln line)
In another scenario, I had to study a test that was pure rote vocabulary definition, which I might add was also multiple choice test. How did that turn out? I cannot remember much of anything I went through for that test besides the pure agony of staying up all night for rote memorization.
I would also think of it like this... across all cultures, there are many sayings and poems(particularly folk songs) that survive till this day. If we didn't have books or computers, they may have been long lost.