The book of Numbers contains the results of a census in Israel, which is why it is called Numbers, but the book also contains descriptions of historical events.
Today’s reading is of the census type. It shows how exacting God is in wanting his laws obeyed. Because of God sparing all firstborns in Egypt during the Passover, God wanted all firstborns exclusively set aside to serve him. That turned out to be impractical, so God took everyone from the family of Levi instead. However, in this counting, it was found that there were more firstborns than Levites, so a fee had to be paid as well. The duties of the Levites, which included the priests, are then defined.
Although the rules Jesus gave us are more general than what we see here, obedience even in the details is still required. We can’t love God or our neighbors in a general way and fail to demonstrate it in specific ways. We can’t mostly avoid stealing or immorality and ignore the occasional failure. God pays attention to the details.