God's moral revelation has intrinsic value. God's standards, like the laws of nature, have built-in consequences. Just as we have to deal with the laws of nature, we will eventually have to deal with the consequences of violating God's standards unless we put our faith in Christ who took on the consequences of our disobedience by His death on the cross. Law and love are harmonized in the Scriptures. In the biblical revelation, love and law are not mutually exclusive, but are harmonized.
Love fulfills the law.
If we love God, we will want to keep His commandments. Obedience to God's Law is not legalism. The Bible speaks strongly against legalism since biblical morality is much more than external obedience to a moral code. No one can live up to God's standards without the enabling power of the Holy Spirit, because we are judged by our attitudes and motivations not just external performance. God's moral revelation was given for our benefit.