But this is the covenant that I will make with the house of Israel after those days, says the Lord: I will put My law in their minds, and write it on their hearts; and I will be their God, and they shall be My people.
Jeremiah 31:33 NKJV
When we make an important agreement with someone, it's a good idea to put it in writing. The parties involved usually have the intent of the covenant in mind, but to memorialize it in ink on paper gives credence to future understanding of the arrangement made. When we are in agreement with God, things take a different turn. Since we are His Creation, it is He who controls how we will remember Him. He takes the minds He gave us and places His Word there. He takes the hearts He placed within us, that beat at His command, and writes His covenant Word there. He also gave us free will to acknowledge that He did this, but whether we adhere to this agreement or not, when God writes something on our hearts, it is indelible.
You are our epistle written in our hearts, known and read by all men; clearly you are an epistle of Christ, ministered by us, written not with ink but by the Spirit of the living God, not on tablets of stone but on tablets of flesh, that is, of the heart.
2 Corinthians 3:2-4 NKJV