Psalm 15 may be understood to preach salvation by behavior, but such a reading would make heaven a hotel to be earned. Rather, we must see the Psalm speaking of a home in which one may live happily:
He who would dwell with God in His house must adapt himself to the arrangements of God’s house.—We may be invited to God’s house and table and yet not gain the enjoyment of that which God offers us.—To desire communion with God and transgress the commands of God are irreconcilable with one another; for vice separates God and man from one another.—He who truly has and seeks communion with God, has and seeks communion likewise with the pious, but avoids the society of the ungodly. The law remains constantly valuable as a mirror, bar and bridle.—He who wishes to dwell forever with God, must inquire after God in time and seek intercourse with God on earth, and for this purpose use the means of grace offered by God according to the order of salvation.
John Peter Lange, Philip Schaff, Carl Bernhard Moll et al., A Commentary on the Holy Scriptures: Psalms (Bellingham, WA: Logos Bible Software, 2008), 119. I do not seek the manner of life as a means of manipulation or to earn a seat with Christ. Rather, I seek relationship with God and it is in the manner of one’s life that the communion is grows.
My children do not become children by behavior – yet God’s children are adopted into a home (Rom. 8:15). However, our relationship will be affected by their behavior. I may spend a joyous time of fellowship or a time of correction: both spring from love and both seek the good of our fellowship. But the means of expressing my love differ.
Now anyone who truly has come into God’s family will seek by all means to love and thus obey:
21 Whoever has my commandments and keeps them, he it is who loves me. And he who loves me will be loved by my Father, and I will love him and manifest myself to him.” 22 Judas (not Iscariot) said to him, “Lord, how is it that you will manifest yourself to us, and not to the world?” 23 Jesus answered him, “If anyone loves me, he will keep my word, and my Father will love him, and we will come to him and make our home with him. 24 Whoever does not love me does not keep my words. And the word that you hear is not mine but the Father’s who sent me. John 14:21–24 (ESV)
We get off on the wrong foot if we think of obedience to the words of Christ as obeying traffic laws. I obey the laws specifically to avoid contact with the government. For the Christian obedience is a means of worship, it is a means of pursuing fellowship with the God of creation.
Calvin, commenting on John 14:21c, writes:
And I will manifest myself to him. Knowledge undoubtedly goes before love; but Christ’s meaning was, “I will grant to those who purely observe my doctrine, that they shall make progress from day to day in faith;” that is, “I will cause them to approach more nearly and more familiarly to me.” Hence infer, that the fruit of piety is progress in the knowledge of Christ; for he who promises that he will give himself to him who has it rejects hypocrites, and causes all to make progress in faith who, cordially embracing the doctrine of the Gospel, bring themselves entirely into obedience to it. And this is the reason why many fall back, and why we scarcely see one in ten proceed in the right course; for the greater part do not deserve that he should manifest himself to them. It ought also to be observed, that a more abundant knowledge of Christ is here represented as an extraordinary reward of our love to Christ; and hence it follows that it is an invaluable treasure.
John Calvin and William Pringle, Commentary on the Gospel According to John (Bellingham, WA: Logos Bible Software, 2010), Jn 14:21–24. Obedience is a means of approach, it is a vantage point from which we can see Christ, it is a home in which we can rest with him.
This then speaks to the motivation to pursue obedience. Obedience to Christ is not the obedience of slave to master, but rather like one who follows the map to a friend’s house. There is nothing servile about following directions to gain a friend’s company.