A city I lived in had this, but when the restaurant owner retired, they explicitly forbade the ground floor from being used for some food-related business. It turns out the residents upstairs were always complaining about the smell. NIMBYism won.
A better solution would have been some mandatory grease/odor filters.
Just to point out that "restaurants in every corner" is not always easy to do, especially in residential blocks. I honestly think that "cooking your own food" (with the help of modern kitchen utensils, time-saving equipment, and the exception being collective canteens/cafeterias for specific groups such as students) is economically advantageous. Because even today in many European cities, many of those tending to restaurants are immigrant labor or somewhat disadvantaged groups who are implicitly pushed towards such jobs due to lack of alternatives.