Organizing the priestly families into specific shifts for Temple service required a system that was completely fair and objective. To establish the exact schedule—determining which family would serve first, second, third, and so on—a lottery system was implemented. The primary approach among commentators is that this method ensured absolute impartiality. In practice, the scribe Shemaiah son of Nethanel facilitated this process. He wrote down the names of the family heads for all twenty-four priestly shifts, placed them into an urn, and drew the names one after another [רד״ק].
The decision to rely on a lottery rather than assigning shifts by rank stemmed from the exceptional character of the priests involved. Both the descendants of Eleazar and the descendants of Ithamar included great, distinguished, and holy leaders of equal spiritual standing. Because these men were equal in their merit, it was impossible to arrange them by level of importance or to grant one individual priority over another through human judgment. The lottery provided the only way to assign their duties without showing favoritism.
Despite this equitable method for the standard Temple service, certain distinctions remained. The position of the High Priesthood itself was kept exclusively for the descendants of Eleazar [רד״ק]. Furthermore, as time passed, the sons of Eleazar eventually assumed almost all the primary leadership roles and positions of prominence within the Temple [ביאור שטיינזלץ].