Matthew is connecting Jesus' Sermon on the Mount with Moses' mountain experiences at Mount Sinai.
The Lord descended to the top of Mount Sinai and called Moses to the top of the mountain. So Moses went up
Exodus 19:20
The Lord said to Moses, “Come up to me on the mountain and stay here, and I will give you the tablets of stone with the law and commandments I have written for their instruction.”
Then Moses set out with Joshua his aide, and Moses went up on the mountain of God....
When Moses went up on the mountain, the cloud covered it, and the glory of the Lord settled on Mount Sinai. For six days the cloud covered the mountain, and on the seventh day the Lord called to Moses from within the cloud. To the Israelites the glory of the Lord looked like a consuming fire on top of the mountain. Then Moses entered the cloud as he went on up the mountain. And he stayed on the mountain forty days and forty nights.
Exodus 24:12-18
Now when Jesus saw the crowds, he went up on a mountainside and sat down. His disciples came to him, and he began to teach them.
Matthew 5:1-2
Jesus isn't just a good teacher who has some good things to say.
Jesus is the bringer of the ultimate truth.
We know that we have come to know him if we keep his commands. Whoever says, “I know him,” but does not do what he commands is a liar, and the truth is not in that person. But if anyone obeys his word, love for God is truly made complete in them. This is how we know we are in him: Whoever claims to live in him must live as Jesus did.
I John 2:3-6
Jesus is inviting you to submit all of your life to his teachings.
We're all being discipled by something.
This is how God showed his love among us: He sent his one and only Son into the world that we might live through him. This is love: not that we loved God, but that he loved us and sent his Son as an atoning sacrifice for our sins.
We love because he first loved us.
I John 4:9-10, 19