The Darchei Moshe in the beginning of Hilchos Tefillin, Siman 32, cites from the Mordechai (Halachos Katanos) the following: One has to make the mitzvah (of tefillin) "nice" on the outside, "and chol shecain" (a fortiori) the inside (of the Tefillin) should be made nice -- because we find of the Beis HaMikdash that the inside was from Zahav Taharah (pure gold).
Why is he drawing a comparison from the Beis HaMikdash to Tefillin? What connection do they have? Why because the Beis HaMikdash was "nicer" on the inside then it was on the outside (seemingly) must we then make tefillin nice (or nicer) on the inside than it is on the outside?