Rabbi Ḥama bar Pappa said in the name of Rabbi Yehuda ben Rabbi Simon: The children of Israel sacrificed offerings on prohibited private altars in the wilderness [the way they did] before the Tabernacle was established, as we learned there: Until the Tabernacle was established, private altars were permitted and the service was [performed] by the firstborn. From when the Tabernacle was established, private altars were prohibited and the service was [performed] by the priests.17Mishna Zevaḥim 14:4.
The Israelites would violate the prohibition of the private altar in the wilderness, and punishments would befall them. The nations of the world would say: ‘They worship in His name and He kills them.’ Therefore, the Holy One blessed be He said to Moses: ‘Go and tell them: “Any man of the house of Israel [who slaughters a bull or sheep…] and to the entrance of the Tent of Meeting he did not bring it […that man shall be cut off from among his people]” (Leviticus 17:3–4).18In order to prevent them from slaughtering consecrated animals outside the Tabernacle, God commanded them to refrain from slaughtering even non-sacred animals.