I had been puzzled by the expression "to know something by heart" long enough that, last night, I dove head first in the pool of google's knowledge. It's easier to answer that question for the French version of that expression. By heart, in French, is "par coeur". Coeur, which gave "core" in English, "cord", "accord", "courage", and last but not least, the old French "recorder", to record. Litteraly re-cord means re(store) cord, in other words to restore the heart. For Egyptians and Romans (and possibly the Greeks too, I didn't check), the heart was the seat of memories. It also meant the stomach, and more generally the host of the soul. They had noticed how the heart beats faster when subject to a strong memory.
I'm a musician. I play, on a "cordes" instrument, music that comes from my "coeur", made with "accords" (chords), which I then re"cord".
On a totally unrelated "note", I took the heroic decision of removing excerpts from my book that I had posted on a writer's website. For obvious reasons, having to do with copyrights, and even more (sadly) obvious reasons, involving the abysmal emotional IQ of the people there, who have decided never to grow up.
I'm going to do it the old-fashioned way. Agent, knock-knock. Publisher, knock-knock. Thank you for reading, and have a memorable day.