The main builder and the assistant builder of Ember have a chat once the city is finished, but before anyone's living in it.
According to the main builder, the citizens will need to stay in the city for at least 200 years, which will hopefully be long enough (for what? We don't know exactly).
The residents of Ember will be provided with instructions on what to do when the time is up. The chief builder proposes giving the instructions to the city's mayor, who can keep them safe and pass them onto the next mayor until the time is right to actually, you know, follow them.
The assistant builder expresses some skepticism that everything will go according to plan, but the main builder answers that nothing is certain—there's no guarantee that the people of the city will survive for two hundred years, or have a safe place to go to.
The first few mayors do a good job of safeguarding the box, but the seventh mayor grows desperate when he falls ill. He thinks the box might contain a secret that could save him, so he brings it home and tries (unsuccessfully) to open it. Selfish, much?
The mayor dies before he can put the box back in his office or tell the next mayor about it. The box sits in his closet for years, until the timed lock opens on its own.