Following up on the last post, here is more from Martin Luther's introduction to the Old Testament:
[I]t is to be noted that the laws are of three kinds. Some speak only of temporal things, as do our imperial laws. These are established by God chiefly because of the wicked, that they may not do worse things. Such laws are for prevention rather than for instruction; as when Moses commands to dismiss a wife with a letter of separation, or that a husband shall bring an “offering of jealousy” for his wife, and may take other wives besides.
All these are temporal laws. — There are some, however, that teach the external worship of God, as was said above.
Over and above these are the laws about faith and love, so that all other laws must and ought to be measured by the laws of faith and love; that is to say, they are to be kept where their observance does not conflict with faith and love; but where they conflict with faith and love, they are entirely void.
Therefore we read that David did not kill the murderer Joab, though he had twice deserved death; and in 2 Samuel 14:11 he promises the woman of Tekoa that her son shall not die, though he has slain his brother; Absalom, too, he did not kill. Moreover, David himself ate of the holy bread of the priests, and Tamar thought the king might give her in marriage to her stepbrother, Amnon. From these and similar stories one sees plainly that the kings, priests, and heads of the people often transgressed the laws boldly, at the demand of faith and love, and therefore that faith and love are always to be mistresses of the law and to have all laws in their power. For since all laws aim at faith and love, none of them can be valid, or be a law, if it conflicts with faith and love.