(Numbers 15:32-36)--"Now while the sons of Israel were in the wilderness, they found a man gathering wood on the sabbath day. 33And those who found him gathering wood brought him to Moses and Aaron, and to all the congregation; 34and they put him in custody because it had not been declared what should be done to him. 35Then the Lord said to Moses, "The man shall surely be put to death; all the congregation shall stone him with stones outside the camp." 36So all the congregation brought him outside the camp, and stoned him to death with stones, just as the Lord had commanded Moses."
Gathering sticks in itself is not wrong. It could be for the purpose of providing a fire for warmth of cooking. The problem is that a man was deliberately and flagrantly gathering sticks in the open on the Sabbath day when God had commanded that no work be done on the Sabbath. This was a direct challenge to God's authority.
(Exodus 31:14)--"Therefore you are to observe the Sabbath, for it is holy to you. Everyone who profanes it shall surely be put to death; for whoever does any work on it, that person shall be cut off from among his people."
Apparently, this was the first public offense against the newly revealed law of God. It was, essentially, being tested. Therefore, the severity of the punishment was to demonstrate to all of Israel the necessity of obeying the Law of God.
This article is also available in: Indonesia