Traditionally, the human heart was considered the residence of the animated soul and numerous Biblical passages refer to that ancient belief:
"You shall love the LORD your God with all your heart..."
"And God said to him in the dream, “I knew that you did this with a blameless heart"
"... so that you do not forget the things that you saw with your own eyes and so that they do not fade from your heart as long as you live"
"Assuredly, thus said GOD: Because you have deemed your heart equal to a god’s"
Evidently, the heart is but a blood pump and has nothing to do with spirituality or intellect. Moses should have known this and use different, more physiologically correct allegories.
IIRC, after Galen's (c. 200AD) discovery of the nervous system, sages included the brain (מח) in the relation with the soul alongside the hears and the liver (earliest source needed).
Why does the Torah see the heart as the source of the mind and feelings as opposed to the head/the brain?