As you can see in the image, after selecting "city focus: food" the AI chooses to create unemployed citizens, instead of specialists, for population that can't work a map tile. With this behaviour the city loses yields. I think it should be tweaked so that AI picks the specialists who give more yields first. If they are equal, pick one specialist of each type.