Apart from the census of all male Levites, Moses now took another census of the men from the ages of thirty to fifty, for only at this age were the Levites permitted to perform service in the Tabernacle throughout their march through the desert, a law that indeed ceased to hold good when Israel settled in the Holy Land. These officiating Levites, as well as the priests, were divided by Moses into eight sections, a number that was not doubled until the prophet Samuel increased it to sixteen, to which David again added eight, so that there were later twenty-four divisions among the Levites and priests.
Moses and David of Levites
Legends of the Jews 4:26