It is necessary to keep the Law of God. The Law of God is seen in the garden when God told Adam to not eat of the tree of the knowledge of good and evil. It proves that men are not able to keep the Law of God. The next is the Law of Moses. Which God sent to correct men after the fall in the garden. But all it did was to prove that we are not made of a substance that can bear correction. Being made of the dust of the earth. So in the due time God sent Yeshua who is the Word made flesh and He was able to keep the Law of Moses even unto the death on the cross. Bearing our correction for us and offering it to us by grace through faith. But in the fullness of time the Law of God will be written upon our heart. Not the letter of the Law of Moses but the spirit of the Law of God for our heart is spirit. It will become a natural part of our character and we will not be able to break it. Internal Law vs. external Law. Because external Law is always at enmity with the flesh. The perfect Law of liberty. This is the purpose of Law in scripture.