The people of Israel ate the manna forty years, till they came to a habitable land. They ate the manna till they came to the border of the land of Canaan.
One of the greatest miracles of the Exodus was God’s grace at this moment in the story. Israel turned against Moses and God’s choice of him by grumbling against his leadership over the issue of not finding food in the wilderness. This really was an issue of not trusting God who had miraculously delivered them from Egypt and destroyed the armies of the most powerful nation in the region. They doubted that God could feed them and slipped into accusation, unbelief, and grumbling.
I think God had a plan to feed them all along. And I think it is clear from the miraculous manna that He was going to use a plan that would be bring worship of Him from the people. The rough part of this whole story is the spiritual ineptness of the Israelites. God gave them miracle bread. He even provided enough on Fridays so that they would not need to gather manna on the Sabbath. He told them to collect double on Friday, and they still went on on the first Sabbath only to find that God kept His word! They were a difficult people for Moses to lead. They were a difficult people for God to instruct.
But God was faithful. And entire generation would be cared for in this way with manna from heaven. God was showing a nation His grace. And even though they found themselves in a resource-poor desert environment, God brought them water and food daily. They had their needs met. And it was miraculous. They should have been drawn to worship and not to complaining!
God will work with complainers, though it is clear that He would prefer that complaining end. He gave the grumblers more grace than they ever deserved, even then they presumed upon it! But God was merciful to the complaining generation. He knew they were rescued slaves. And He kept being faithful to them, even as they struggled to be faithful to Him. God loves people, even complainers, with great love. There is thus hope for me, for I can be just like these people. I can get full of the wants of this world. I can get faithless. I can be deceived by my own forgetfulness and focus on just myself. And God will faithfully draw me back with His love and provision.