While the random process of choosing people for jobs doesn't make much sense, it does lend a lot of credence to why the city is in such crappy condition - all the times when people with very little technical skill got put into technical jobs, and vice versa.
If the power finally did go out in Ember with everyone there.
Supposedly, it did. Lina asks how many people were "left behind" in the second book, and the reply is "Too many", which leads one to believe that some were left in the city.
Confirmed as of The Diamond of Darkhold, where the Troggs mention coming across the bodies of those who were trampled during the escape through the Pipeworks, which they disposed of by dumping them into the river. We don't get any word as to whether anyone actually survived, though.
In The City Of Ember, the plan was to live in the underground city for 200 years, but due to government conspiracy gone wrong they don't know how to get out, or even that they should get out. The city is falling into decay and food supplies are running low. Canned food supplies. Canned food supplies which were never replenished. Had they gotten out when they were originally supposed to, they would still have been eating 200-year-old canned food. Even Twinkies don't last that long.
If they have small, diamond shaped solar generators, I don't think it's too far-fetched that they found some way to preserve food for longer periods of time. Besides, they also had fresh vegetables from the greenhouses.