When Jesus begins the Sermon on the Mount, He is sitting on a mountain teaching about the law. He is a new Moses; He is Yahweh.
To get the full force of the analogy, we should recalled that God reveals more on Sinai than the Ten Word or moral commandments. Yahweh gives the Ten Words and the Book of the Covenant, but then He also gives lengthy instructions about the tabernacle. 
Jesus is giving moral instructions, telling His disciples how to live. But he is also, more subtly, revealing the architecture of a new temple. That is most evident at the end, when Jesus tells a parable about different houses. Whoever hears Jesus words and keeps them is like a man building a house on a rock. Jesus’ instructions provide a blueprint for a house. As NT Wright has said, the house is the temple, and implicitly the house of Israel symbolized by the temple. Those who hear Jesus will survive the coming flood. Those who hear and build according to a different plan will see their house fall in a great fall.
There is a specific verbal echo of the sanctuary texts in 7:28, which says that Jesus “finished” (teleo) these sayings (the word is repeated after every major discourse, at 11:1, 13:53; 19:1; 26:1). A variation of this root (sunteleo) is used in the LXX of Exodus 40:33, when Moses “finishes” the work of the tabernacle. That in turn echoes the creation account, when God works to “complete” (sunteleo) the heavens and earth (Genesis 2:4, LXX).
On the mountain, Jesus’s words provide the pattern, the tabnit, of a new sanctuary, a human sanctuary living by a righteousness that surpasses the righteousness of the scribes. As the Creator, He speaks a new world of justice into being. By His teaching about the law, by His instructions for the apostolic mission, by His wisdom parables about the kingdom, by His instructions on forgiveness and reconciliation, by His words of judgment and condemnation to the scribes, Pharisees, and hypocrites, Jesus is building a new house and speaking a new world into being. Jesus is the architect of a new world, the carpenter of new creation.
Once we acknowledge the possibility that Jesus is not just giving moral instruction but giving a verbal blueprint for a new holy household, we can spot something about the sequence in chapter 5. After pronouncing the beatitudes, He describes the disciples as salt, as light on a lampstand, and then describes His own relation to Torah.
That is a tabernacle sequence. Salt is mixed into the tribute offerings (Leviticus 2:13). A memorial portion of each tribute offering was placed on the altar of ascensions and taken up to God. If the disciples are “salt” then they are in the courtyard.
Jesus’s use of “light” is a complex image, but it includes an explicit reference to a “lampstand” (luchnia), using the standard word that translates “menorah” in the LXX. If the disciples are light on a lampstand, they are in the holy place, with Jesus as the priest in a white robe tending the lamps.
Then Jesus talks about the Torah and His relationship to it. He does not abolish the Torah but fulfills it. In terms of the structure, Jesus has moved from the courtyard with its salt sacrifices, to the lampstand, to the most holy place, where the tablets of Torah are housed. His disciples are the furnishings and materials of a new sanctuary system.
Jesus is building a word-house that will come into actual form as His disciples obey His commandments. But the furnishings and materials of this word-house are not confined to the house.
Or, perhaps better, Jesus is extending the boundaries of His house.
Salt is mixed with the tribute offering of grain, but Jesus says that His disciples are not merely salted sacrifices, but salt of the earth. The lamps on the lampstand were hidden; no one ever saw them except the priests. But the disciples are lights on a public lampstand, one that shines into the world, so that men may see the good works of the disciples. The tablets of Torah were in the ark, but Jesus is the living Torah who goes out and about among the people.
Jesus extends the liturgical patterns of the tabernacle, and the liturgical symbolism of the tabernacle, to the disciples’ activities in public life.