Why the Torah Is Compared to Gold and Silver
Tefillah
In Pirkei Avos (6:9), and in the words of Dovid HaMelech, "Better to me is the Torah of Your mouth than thousands in gold and silver" (Tehillim 119:72). Rav Hillel asks in Shirei Maskil why the Torah is likened to pearls (Mishlei 3:15) and judged more precious than gold and silver, when these things have no real worth. Only in this world of falsehood do simple people and fools think they do. He answers with a mashal he heard in his youth from his rebbe, the Chasam Sofer. A good king, who ruled many lands, wished to visit his subjects once a year, and his advisors debated how he should appear. One group wanted him in his most lavish royal garments. A second group argued that wealth does not show a man's worth, since scoundrels also dress in splendor, and proposed that he wear simple clothes with jeweled breastplates inscribed with his battles and his acts of kindness, such as lowering taxes and arranging public works. A third group answered that the simple, illiterate peasants could not read the inscriptions and would see only a man in plain clothes. A wise sage proposed the compromise. The king would wear fine royal garments, with the inscribed breastplates attached to them. The simple people would marvel at the garments, while the learned would appreciate the record of his deeds. So too the Torah is likened to pearls, gold and silver. Talmidei chachamim need no such comparison, for they know that even each crown of each letter holds infinitely more value and teaches myriads of laws (Eruvin 21b). The am ha'aretz, who cannot appreciate the Torah's true value, needs it described in the language he understands. Dovid HaMelech and his son Shlomo HaMelech, wishing to reach even the simplest of people, therefore compared the Torah to pearls, gold and silver.
Source: Shirei Maskil 10:1 (on Pirkei Avos 6:9 and Tehillim 119:72)