Some people view Numbers 3:39-50 as a contradiction of Exodus 13:1-16 and Exodus 34:19-20, on the topic of firstborn male sacrifice and substitution. However, there is a simple explanation for why the rules have changed.
In Exodus 13:1-16 and Exodus 34:19-20, the Israelites were commanded to sacrifice every firstborn male, but they had to redeem the humans, similar to how Abraham and Isaac (Genesis ch. 22), but instead by paying five shekels of silver (Lev 27:6, Num 3:46-47, Num 18:16). However, in Numbers chapter 3 God expands this command, prioritizing the Levites first. The Levites are the ones required to follow this command for every number of non-Levite firstborn males. The non-Levites only had to follow this command if there weren’t enough Levites to represent them. So, if the Levites had more firstborn boys than the non-Levites, then only the Levites would redeem their sons in place of the non-Levites. However, if there were more non-Levites then the principle of Exodus 13 and 34 still applies to the number of non-Levites that are over the number of Levite firstborn males. The second scenario happens in Numbers 3:39-50 because there are 22,000 Levite males, but 22,273 non-Levite males. So for the extra 273 males, the non-Levites were to pay 1,365 shekels (273 x 5).
Is this a contradiction, did God change his mind? Isn’t God supposed to “change not” (Malachi 3:6) and doesn’t the bible say even Jesus is the same yesterday, today, and forever (Hebrews 13:8)? So what gives? The Levites were set apart at the beginning of Numbers because they were connected to the priesthood of Aaron’s family established in Leviticus. This new mechanism was what God always intended but it couldn’t be applied before the Levites and priests were set apart for their assignment. When the Israelites came out of Egypt they had elders functioning as “priests” but they were just carrying on with whatever traditions they remembered from Abraham. In this new covenant, God was setting the nation of Israel apart from all the Gentile nations so he created a new system just for them.
The purpose of the dedication is explained in Exodus 13:14-16 and Numbers 8:16-18:
Exodus 13:14 “And in the future, your children will ask you, ‘What does all this mean?’ Then you will tell them, ‘With the power of his mighty hand, the Lord brought us out of Egypt, the place of our slavery. 15 Pharaoh stubbornly refused to let us go, so the Lord killed all the firstborn males throughout the land of Egypt, both people and animals. That is why I now sacrifice all the firstborn males to the Lord—except that the firstborn sons are always bought back.’ 16 This ceremony will be like a mark branded on your hand or your forehead. It is a reminder that the power of the Lord’s mighty hand brought us out of Egypt.”
Numbers 8:16 “Of all the people of Israel, the Levites are reserved for me. I have claimed them for myself in place of all the firstborn sons of the Israelites; I have taken the Levites as their substitutes. 17 For all the firstborn males among the people of Israel are mine, both of people and of animals. I set them apart for myself on the day I struck down all the firstborn sons of the Egyptians. 18 Yes, I have claimed the Levites in place of all the firstborn sons of Israel. 19 And of all the Israelites, I have assigned the Levites to Aaron and his sons. They will serve in the Tabernacle on behalf of the Israelites and make sacrifices to purify the people so no plague will strike them when they approach the sanctuary.”
Gentiles could come to God the way Abraham did out in the open with altars made of stones, but at this point, Israel was to worship God in a new way once they got into the promised land (Deut 12:8-11), because they have a unique covenant with God. Notice how some of the laws in the Torah that were given at the time of Moses (before they entered the land), did not apply until they conquered the land which would have been 40 years after the Exodus from Egypt. It’s in the book of Joshua, which takes place after Moses died, that these laws would start to apply. Many laws in the Torah are conditional based on circumstances and were written in advance before they can be applied.
An example of this can be found in Numbers 15:17-19. Numbers 15:17 says, “Then the Lord said to Moses, 18 “Give the following instructions to the people of Israel. “When you arrive in the land where I am taking you, 19 and you eat the crops that grow there, you must set some aside as a sacred offering to the Lord.”
This law could not be followed while there were in the wilderness, and there are many rules like this in the Torah that only apply to certain people or certain locations, or when there is a Tabernacle/Temple, which is why many Old Testament Laws don’t apply in the New Covenant. These new instructions were given because of the change in status of the Israelites in their connection with God, not because God changed his mind. God planned everything from the beginning, he even promised the coming of the Messiah to defeat the enemy (Satan) all the way back in Genesis 3:15.