Assigning guard duties in the Temple involved a process of drawing lots to divide responsibilities among the four directions of the complex. Through this system, each family head was granted a specific side equipped with a set number of guard posts [ביאור שטיינזלץ]. The initial drawing placed Shelemiahu and his men at the eastern gate [מצודת דוד], an area that required six guards each day [רלב״ג, מלבי״ם].
This assignment, however, presented a practical problem. Shelemiahu's family consisted of seven family heads, meaning one leader would inevitably be left without a designated role for the eastern watch. At this point, the character of Shelemiahu's eldest son, Zechariahu, provided a solution [מלבי״ם, ביאור שטיינזלץ]. Known as a wise and understanding person capable of offering excellent advice [מצודת דוד, רלב״ג], Zechariahu recognized the embarrassment that might fall upon whichever family member was excluded. To prevent this shame, he chose to step aside and give up his own position [מלבי״ם]. Because he was the eldest and held in high regard, it was obvious to everyone that his withdrawal was a deliberate sacrifice rather than a reflection of any personal flaw or lack of honor.
Following this noble decision, a separate lottery was held specifically for Zechariahu and his men. In this subsequent drawing, they were assigned to guard the northern gate [מצודת דוד, מלבי״ם], a section of the Temple that required four guards daily [רלב״ג, מלבי״ם].