1 Then the Lord spoke to Moses, saying, 2 “Speak to the sons of Israel, and get from them a rod for each father’s household: twelve rods, from all their leaders according to their fathers’ households. You shall write each name on his rod, 3 and write Aaron’s name on the rod of Levi; for there is one rod for the head of each of their fathers’ households. 4 You shall then deposit them in the tent of meeting in front of the testimony, where I meet with you. 5 It will come about that the rod of the man whom I choose will sprout. Thus I will lessen from upon Myself the grumblings of the sons of Israel, who are grumbling against you.” 6 Moses therefore spoke to the sons of Israel, and all their leaders gave him a rod apiece, for each leader according to their fathers’ households, twelve rods, with the rod of Aaron among their rods. 7 So Moses deposited the rods before the Lord in the tent of the testimony. 8 Now on the next day Moses went into the tent of the testimony; and behold, the rod of Aaron for the house of Levi had sprouted and put forth buds and produced blossoms, and it bore ripe almonds. 9 Moses then brought out all the rods from the presence of the Lord to all the sons of Israel; and they looked, and each man took his rod. 10 But the Lord said to Moses, “Put back the rod of Aaron before the testimony [b]to be kept as a sign against the [c]rebels, that you may put an end to their grumblings against Me, so that they will not die.” 11 Thus Moses did; just as the Lord had commanded him, so he did. 12 Then the sons of Israel spoke to Moses, saying, “Behold, we perish, we are dying, we are all dying! 13 Everyone who comes near, who comes near to the tabernacle of the Lord, must die. Are we to perish completely?”
Numbers 17:1 - 13
ESV - 1 The Lord spoke to Moses, saying. 2 Speak to the people of Israel, and get from them staffs, one for each fathers' house, from all their chiefs according to their fathers' houses, twelve staffs. Write each man's name on his staff.
For follow-up discussion and general commentary on the topic. Comments are sorted chronologically.
The short answer is; Moses was instructed to put Aaron's rod in the Tabernacle and keep it there as a reminder that it was the LORD God Himself that chose Aaron and his sons to serve as priests. It was kept as a sign for the rebellious Israelites.