After the massive walls surrounding Jerusalem were finally rebuilt, a difficult reality set in. The newly fortified boundaries enclosed a vast area, yet the city inside remained largely empty, with a sparse population and very few houses actually constructed [רלב״ג, ביאור שטיינזלץ]. To solve this, Nehemiah moved forward with a vision to repopulate the city. His goal was to reverse Jerusalem's desolate state, restore its former condition, and create a strong foundation to support the Temple service and the daily practice of the Torah [רלב״ג, מלבי״ם].
The first step in this resettlement effort began with the nation's leaders and officials. They took the initiative to move into Jerusalem, accepting the responsibility to support the priests and the House of God [מלבי״ם]. However, a broader solution was needed to fill the rest of the city. The people decided to cast lots to select one out of every ten individuals from the surrounding cities of Judah. This process acted as a kind of human tithe, dedicating a tenth of the population to relocate and build their lives in Jerusalem [מצודת דוד, מלבי״ם].
This mass relocation served a dual purpose. Beyond simply filling the empty streets, the new residents provided essential security, guarding the holy city against the surrounding nations that worshipped idols [רש״י, מצודת דוד]. Meanwhile, the remaining nine parts of the population, who were not selected in the lottery, simply stayed behind to continue living in their original towns and cities [רש״י, ביאור שטיינזלץ, מצודת דוד, מצודת ציון].