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.
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.
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 weird magical sunlight diamonds, 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.