So that when you finally admitted you can't keep His commandments perfectly, you would turn to Him for His mercy and GRACE.....receiving the free gift of eternal life, and rest from trying to earn it.
Which shows the purpose of the law is to bring us UNTO Christ. You think you have to stay under the schoolmaster (law of commandments), but you were never meant to stay there. You're supposed to recognize that you just can't be perfect. So you fall on your knees and thank Him for the FREE GIFT of salvation (eternal life).
Gal. 3:24-25 Wherefore the law was our schoolmaster to bring us unto Christ, that we might be justified by faith. But after that faith is come, we are no longer under a schoolmaster.
Saved people are to keep Gods commandment to love one another according to the Apostle John.--
1Jn 2:3 And hereby we do know that we know him, if we keep his commandments.
1Jn 2:4 He that saith, I know him, and keepeth not his commandments, is a liar, and the truth is not in him.
1Jn 2:5 But whoso keepeth his word, in him verily is the love of God perfected: hereby know we that we are in him.
1Jn 2:6 He that saith he abideth in him ought himself also so to walk, even as he walked.
1Jn 2:7 Brethren, I write no new commandment unto you, but an old commandment which ye had from the beginning. The old commandment is the word which ye have heard from the beginning.
1Jn 2:8 Again, a new commandment I write unto you, which thing is true in him and in you: because the darkness is past, and the true light now shineth.
1Jn 2:9 He that saith he is in the light, and hateth his brother, is in darkness even until now.
1Jn 2:10 He that loveth his brother abideth in the light, and there is none occasion of stumbling in him.
1Jn 2:11 But he that hateth his brother is in darkness, and walketh in darkness, and knoweth not whither he goeth, because that darkness hath blinded his eyes.
LA