Exodus 20:24-25, Where To Offer Sacrifice
Make an altar of earth for me and sacrifice on it your burnt offerings and fellowship offerings, your sheep and goats and your cattle. Wherever I cause my name to be honored, I will come to you and bless you. If you make an altar of stones for me, do not build it with dressed stones, for you will defile it if you use a tool on it.
//Feel like giving a goat to God? Just make an altar. Anywhere you please. Pile up some rocks and knock yourself out. It’s right there in the law: God will come to wherever he is honored, and will bless you.
Why, then, do we read these verses a bit later?
Be careful not to sacrifice your burnt offerings anywhere you please. Offer them only at the place the LORD will choose in one of your tribes, and there observe everything I command you. –Deuteronomy 12:13-14
Lest you imagine that these two verses refer to two different periods in time, it’s not so. Both were given to the Israelites on Mount Sinai.
Bible scholars, however, do recognize that the Law reflects different times. Leviticus chapter 17 makes it clear why the law was changed: Folks were sacrificing their goats to the goat-gods, not to Yahweh. So, the prohibition was put in place: bring your animals to the sanctuary and give them to the priests, so it will be done right.
These two laws are exact opposites, but in order to authenticate them, both lawgivers presented their laws as having been delivered to Moses on the mountain.