Colonists will get food from the nearest room with a table, before checking elsewhere.
This includes lower quality food and nutrient paste dispensers even if there is better elsewhere. The assumption is that you chose to put the food in that room to be eaten. So colonists will do that.
Food in hospital rooms will also be used for patients in that hospital, and the same for food in prisons for prisoners.