Textual: Mormon takes time out from his narrative to explain law. Why does he do this? It may be that he expects that his readers would find it surprising that such an offense to the majority religion would be tolerated. Thus Mormon is explaining the legal background behind the story that will follow. The concept that individual beliefs may be tolerated must not have been a common conception, else Mormon would not have thought it sufficiently notable to mention.
Legal: We saw that Mormon was able to see a basis for Nephite law in brass plate scripture (verse 8). This general explanation of the nature of Nephite law might also have found its legal precedent in the law of Moses. The law of Moses focused on the actions performed by a man, and proscribed those actions. While there might have been a presumption that the thought would precede the action, and that the thought ought to be regulated as well, this was not explicit in the law. The law of Moses focused on the act of adultery, not upon the lust that might lead to it (this shift in location of emphasis is one of the major themes of Christ’s Sermon on the Mount, which will be discussed as part of that chapter).
The Nephite laws are described precisely in terms of the separation of thought and action. The law proscribed actions, and not the thoughts that might lead to those actions. While this might appear to be a reasonable distinction, it was nevertheless important enough that Mormon would note it. The previous reference to scripture as the basis for Mosiah’s laws and the correspondence of these ideas to the general structure of the Mosaic laws strongly suggest that Mosiah turned to scripture when formulating his legal system.