Devarim / Deuteronomy 10:2 · Drash
וְאֶכְתֹּב עַל־הַלֻּחֹת אֶת־הַדְּבָרִים אֲשֶׁר הָיוּ עַל־הַלֻּחֹת הָרִאשֹׁנִים אֲשֶׁר שִׁבַּרְתָּ וְשַׂמְתָּם בָּאָרוֹן׃
And I will write on the tablets the words that were on the first tablets which you broke, and you shall put them in the ark."
Drash דְּרָשׁ
Fragments in the ark
You see a poor learned man in an old coat. Should he be honoured less than a rich one? The midrashim answer with a parable about a king and with the fragments of the tablets.
Shemot Rabbah: the Eternal wrote the first tablets, and the second He told Moshe (Moses) to write, like a king who was reconciled with his wife who had done wrong, through the best man, and said to him: "You write her marriage contract." Midrash Tanchuma: the fragments of the first tablets lie in the ark beside the whole ones. So too honour a Torah scholar, even if he is poor and worn out, for the Torah is within him.
How Shemot Rabbah and Midrash Tanchuma explain it
Shemot Rabbah Write for yourself (Shemot / Exodus 34:27)
Another interpretation. "Write for yourself": the Holy One, blessed is He, said to Moshe: "The first tablets I wrote, as it is said: 'written by the finger of the Almighty' (Shemot / Exodus 31:18). But the second you write, and I will only put My hand to them." A parable of a king who married a woman and wrote her a marriage contract of his own. Some time later she did wrong, and he drove her out of his house. Her best man came and reconciled her with the king. The king said to the best man: "I have already been reconciled with her, but you write her the marriage contract, and I will only put my hand to it." This is what is said: "And I will write on the tablets" (Devarim / Deuteronomy 10:2).
Midrash Tanchuma Inside and outside you shall overlay it (Shemot / Exodus 25:11)
What does "inside and outside you shall overlay it" mean? He said to him: although the wood is in the middle, treat it with honour. Why? Because the Torah lies in it. And the tablets likewise: although they were broken, treat them with honour, as it is said: "and you shall put them in the ark" (Devarim / Deuteronomy 10:2). The tablets and the fragments of the tablets lie in the ark. "And you shall put them in the ark" means: although you see that Torah scholars are poor and worn out, treat them with honour, for the Torah is within them.
"And he made for it a crown of gold" (Shemot / Exodus 37:2). Why? Because the Torah lay there. There are three crowns: the crown of Torah, the crown of priesthood and the crown of kingship. And there is one more crown, the crown of a good name, and it rises above them all. What is the crown of Torah? As it is said: "Wisdom gives life to those who have it" (Kohelet / Ecclesiastes 7:12), in this world and in the world to come. That is why it is written: "And he made for it a crown of gold."
Takeaway
Of the second tablets the Torah says both "I will write on the tablets" (Shemot / Exodus 34:1) and "Write for yourself these words" (Shemot / Exodus 34:27). Shemot Rabbah reads it this way: Moshe wrote, and the Eternal put His hand to it.
The best man in the parable is Moshe: after the golden calf he pleaded for the people, and the Eternal relented of punishing them (Shemot / Exodus 32:11–14).
The ark was made of acacia wood and overlaid with gold inside and outside (Shemot / Exodus 25:10–11). So the wood was in the middle, between two layers of gold.