Big things are happening on TV Tropes! New admins, new designs, fewer ads, mobile versions, beta testing opportunities, thematic discovery engine, fun trope tools and toys, and much more - Learn how to help here and discuss here.
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.
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.