Ex 16.1-3 Story; The people grumble at the LORD thinking Egypt was better
Ex 16.4-36 Sin-Law; The LORD hears Israel's grumbling and gives them a law to test them. They fail.
Ex 17.1-7 Sin-Story; The people grumble against the LORD and he gives them water from the rock
Ex 17.8-16 Story; Israel defeats Amalek by Moses raising his hand
Ex 18.1-9 Story; Moses recounts to Jethro (his father in law) how the LORD saved them from Egypt
Ex 18.10-12 Story; Jethro blesses the LORD and makes a burnt offering
Ex 18.13-27 Story; Moses on Jethro's advice delegates some judgement responsibility
Passage and Comments
Some instructions and laws were given by the LORD to Israel as a result of their sin. Here is one of them. (The last probably being circumcision after Abraham slept with Hagar.) This instance goes;
 Then the LORD said to Moses, “Behold, I am about to rain bread from heaven for you, and the people shall go out and gather a day's portion every day, that I may test them, whether they will walk in my law or not.  On the sixth day, when they prepare what they bring in, it will be twice as much as they gather daily.”  So Moses and Aaron said to all the people of Israel, “At evening you shall know that it was the LORD who brought you out of the land of Egypt,  and in the morning you shall see the glory of the LORD, because he has heard your grumbling against the LORD. For what are we, that you grumble against us?”  And Moses said, “When the LORD gives you in the evening meat to eat and in the morning bread to the full, because the LORD has heard your grumbling that you grumble against him—what are we? Your grumbling is not against us but against the LORD.” (Exodus 16:4-8)
The law was given to test them, to see if they would walk in God's law. Before the law was not needed, now it came as a response to Israel's grumbling. As it turns out this new law shows up Israel's sin. Maybe this should go in fail blog.
Story of Israel
Israel unfortunately kept grumbling against God. Eventually God got fed with it and sent them into exile until they could pay their sins off by the punishment.
Story of Jesus
When Jesus came he removed these laws. Paul in Galatians refers to some as them as a form of slavery. The bondage imposed by God on Israel who grumbled and sinned against him. So God's people now experience freedom from these laws, but responsibility to promote the laws (e.g. Ten Commandments) that protect people around us and are commonly experienced in the conscience of all people.