The works commanded in the Sermon on the Mount are merely training exercises, helping us to recognize, agree to, and realize the principles of love. Doing them teaches us what manner of being we are, and what manner of being God is. Knowing what manner of being God is is important because salvation consists of being assimilated into his likeness and being. In plain terms, salvation consists of becoming God. That's the point of being one in him, having the same spirit, the same mind, the same heart, mutually indwelling, knowing all things.
If you are saved, you cease to be you as you have always known you and you become him. You will know all that he knows, and you will feel as he feels, and you will freely do what he would freely do. Therefore you have to be persuaded, fully, competently, that to be what God is is better, or more desirable, than to be what you are, otherwise you will not freely choose to be what he is; you do not want it, and thus he cannot make you what he is without denying your agency - erasing against your will those things which separate you from him, those things you aren't persuaded he is right about, those things you have yielded to another power.
So what he is looking for are people who will always freely do that which is good, of their own free will and choice, for there is no external government among the Gods. You either govern yourself wholly according to the good or you aren't a God - you aren't ready, not yet being persuaded, not yet agreeing. You remain you, because you don't want to be what God is. You do not wish to love as he loves.
And we show that this is what we want - we show that we agree to his terms and conditions - when we lay down our all - everything we have and are - in sacrifice in the exercise of keeping all his commandments as contained in the Sermon and delivered to us directly, thus showing that we are, in fact, fully persuaded that he is trustworthy, and that to be him is better than to be us. Then is his grace - ability to give a good gift - sufficient for us, for we have shown before all that we agree to be saved, even unto ourselves; we know by our own experience through keeping his commandments what it is we are asking for, and are therefore competent, or able, to receive it.
Otherwise, we aren't worthy of the gift he would give, which gift is his own being, all that he is and has, including his love.
One of the interesting things about the name-title יְהוָה אֱלֹהִים (Yehovah Elohiym; KJV: LORD God) is that it can be translated "He who causes the Gods to be," or, more succinctly, "The Godmaker."