In the verse speaking of the Jews as a “treasure,” Moshe says, “as He spoke to you.” In the second verse describing the Jews as “holy,” Moshe says “as He spoke.” Previously in his commentary, Rashi explained that the phrase “as He spoke to you” means “concerning you.” (Rashi to Bereishis 28:15) In other words, it refers to a statement G-d has made about the subject of the verse, not that G-d is speaking to, or commanding, the subject. The phrase “as He spoke” without the qualifying “to you,” refers to a direct command to the subject.
The verse in Shemos, “you shall be to Me a treasure out of all peoples... and a holy nation,” is not a command to the people, but rather, G-d conveying His guarantee that the Jewish people will always be treasured by, and holy to, Him. Therefore, Rashi could not explain that the second verse, “and so that you will be a holy people to your God, as He spoke,” referred to the verse in Shemos, because clearly the intention here is to a command to be holy, not a description of holiness.
The verse from Vayikra, on the other hand, is a command to the Jewish people to behave in a holy manner. More specifically, the verse places this command in the context of the Jewish people’s uniqueness relative to other nations: “And you shall be holy to Me... and I have distinguished you from the peoples, to be Mine.” The opening of Kedoshim, on the other hand, is an individual command to be holy. Rashi therefore cited the verse from the end of Kedoshim, because it corresponds to the theme of our verse which is also the uniqueness of the Jewish people as a nation, “to make you supreme, above all the nations that He made.”
