1 Chronicles 24:5

5 All tasks were assigned to the various groups by means of sacred lots so that no preference would be shown, for there were many qualified officials serving God in the sanctuary from among the descendants of both Eleazar and Ithamar.

1 Chronicles 24:5 Meaning and Commentary

1 Chronicles 24:5

Thus were they divided by lot, one sort with another
Which course should serve first, and which next, and so on; and who should be the chief to each course; which course was to serve a week, and then go out; and this method was taken to prevent envy, strife, and contention about precedence:

for the governors of the sanctuary;
or of the holy things, or who presided in things ecclesiastical:

and governors of the house of God:
or rather "governors of God", appointed by him judges in civil things:

were of the sons of Eleazar, and of the sons of Ithamar:
there were, of both families, some employed both in sacred and civil things, and who presided in each.

1 Chronicles 24:5 In-Context

3 With the help of Zadok, who was a descendant of Eleazar, and of Ahimelech, who was a descendant of Ithamar, David divided Aaron’s descendants into groups according to their various duties.
4 Eleazar’s descendants were divided into sixteen groups and Ithamar’s into eight, for there were more family leaders among the descendants of Eleazar.
5 All tasks were assigned to the various groups by means of sacred lots so that no preference would be shown, for there were many qualified officials serving God in the sanctuary from among the descendants of both Eleazar and Ithamar.
6 Shemaiah son of Nethanel, a Levite, acted as secretary and wrote down the names and assignments in the presence of the king, the officials, Zadok the priest, Ahimelech son of Abiathar, and the family leaders of the priests and Levites. The descendants of Eleazar and Ithamar took turns casting lots.
7 The first lot fell to Jehoiarib. The second lot fell to Jedaiah.