[Book of Mormon] Mosiah 13:29
And Now I say unto you that it was expedient that there should be a law given to the children of Israel, yea, even a very strict law; for they were a stiffnecked people; quick to do iniquity, and slow to remember the Lord their God.
It seems a bit strange here that the author of the Book of Mormon on the one hand sees these people as Israelites, and then talks about them in the third person as if they weren’t there. Did Moses give the laws to these people or not? Abanadi seems to be contradicting himself here.
But now to Israel being a stiffnecked people, true enough, even the Bible describes them this way, but what does this have to do with God giving them the law and not the Egyptians who seemed to be just as slow to recognize their god, who by all accounts were very quick to iniquity. Well just name a nation that can’t be described this way. And how does giving them a strict law help that matter?
I dare say I was a rather stiffnecked teenager. The stricter my parents rules became the more apt I was to break them and worse, which seems to be a common side effect of law:
“Likewise, my brothers, you also have died to the law through the body of Christ, so that you may belong to another, to him who has been raised from the dead, in order that we may bear fruit for God.  For while we were living in the flesh, our sinful passions, aroused by the law, were at work in our members to bear fruit for death.  But now we are released from the law, having died to that which held us captive, so that we serve not under the old written code but in the new life of the Spirit.
 What then shall we say? That the law is sin? By no means! Yet if it had not been for the law, I would not have known sin. I would not have known what it is to covet if the law had not said, "You shall not covet."  But sin, seizing an opportunity through the commandment, produced in me all kinds of covetousness. Apart from the law, sin lies dead.  I was once alive apart from the law, but when the commandment came, sin came alive and I died. “(Romans 7:4-9 (ESV)
Giving Israel a strict law does not seem to have helped them to avoid sin. That was not the point of the law. It was not a punishment for their transgressions. In many ways it was actually a gift.
God chose Israel to be the vessel of salvation to all nations, for no other reason than love. It definitely was not in that they somehow excelled in sinning.