Exodus 16:
Because God didn't stipulate an explicit punishment at the time. He only did it later.
S1 disobeyed God's instruction.23 he said to them, “This is what the LORD has commanded: ‘Tomorrow is a day of solemn rest, a holy Sabbath to the LORD; bake what you will bake and boil what you will boil, and all that is left over lay aside to be kept till the morning.’” 24So they laid it aside till the morning, as Moses commanded them, and it did not stink, and there were no worms in it. 25Moses said, “Eat it today, for today is a Sabbath to the LORD; today you will not find it in the field. 26 Six days you shall gather it, but on the seventh day, which is a Sabbath, there will be none.”
27 On the seventh day some of the people [Label these people S1] went out to gather,
There was no mention that S1 were punished. At that time, there was no specific prescription of punishment for violating the Sabbath except the general sin offerings. That changed in Exodus 35:but they found none. 28And the LORD said to Moses, “How long will you refuse to keep my commandments and my laws? 29See! The LORD has given you the Sabbath; therefore on the sixth day he gives you bread for two days. Remain each of you in his place; let no one go out of his place on the seventh day.” 30So the people rested on the seventh day.
After that, they continued their journey and celebrated the 2nd Passover in Num 15:1 Moses assembled the whole Israelite community and said to them, “These are the things the Lord has commanded you to do: 2For six days, work is to be done, but the seventh day shall be your holy day, a day of sabbath rest to the Lord. Whoever does any work on it is to be put to death.
Some months later, in Num 15:1 In the first month of the second year after Israel had come out of the land of Egypt, …
4So Moses told the Israelites to observe the Passover, 5and they did so in the Wilderness of Sinai, at twilight on the fourteenth day of the first month. The Israelites did everything just as the LORD had commanded Moses.
Why S1 were not stoned to death?32 While the Israelites were in the wilderness, a man was found gathering wood on the Sabbath day. 33Those who found him gathering wood brought him to Moses and Aaron and the whole assembly, 34and they kept him in custody, because it was not clear what should be done to him. 35Then the Lord said to Moses, “The man must die. The whole assembly must stone him outside the camp.” 36So the assembly took him outside the camp and stoned him to death, as the Lord commanded Moses.
Because God didn't stipulate an explicit punishment at the time. He only did it later.