In Leviticus 19, before God begins to give various commands to Moses for the people, He says,
“Speak to all the congregation of the people of Israel and say to them, You shall be holy, for I the LORD your God am holy. – Leviticus 19:2
The standard for them is to be holy. And the reason that God gives here is not that it would be well with them or because it’s good for society or that they may earn salvation. All of these things are true. (For the last one, if someone could have obeyed the law perfectly, they wouldn’t have needed a Savior, but no one could have, because of sin.) No, the reason that God gives here, and the supreme reason for holiness is found in these words: for I the LORD your God am holy.
And then throughout the rest of the chapter, God punctuates many of the commands with, I am the LORD your God, as if to be a constant reminder that the lawgiver is God Himself.
God’s will for Israel was that they would be His representatives on earth, because He was their God and they were His people. That’s why they were expected to be like Him, to be holy as He is holy. And as their King and God, it was His absolute right to command that of them. They were to obey Him primarily because of who He is.
Today, Christians are in a similar, but even greater situation. In the case of Christians, Jesus did what no one else could: He obeyed the law of His Father perfectly. He was and is holy as His Father is holy. And so when He took the penalty that sinners like us deserve on the cross, His sacrifice was worthy.
And now, all who believe in Him are forgiven of all their sins. But, the standard of living still applies. While, we’re not trying to earn salvation anymore, since Jesus gives it to us freely by faith, we are still called to be holy as He is holy. We are now representatives of Jesus Christ; we are the King’s emissaries, and though our salvation is free, He holds us to His standard of holiness for His namesake.
Thus, we don’t obey in order to earn salvation. We don’t obey primarily because it’s good for us and for the world. We obey because of who He is, and it’s a delight for us to worship Him accordingly.
Let it also be added that even our obedience is also by His grace. We have no room to boast, but only to bow.