> cooking has economies of scale and specialization, so it’s cheaper to cook for many families at once
I'll try to add a little more value to the conversation - there are a lot of hidden costs in cooking at home. A kitchen could take up valuable real estate that is significantly underutilized compared to a commercial kitchen. A personal kitchen also has maintenance costs on top of cooking and cleaning each meal.
I do acknowledge a lot of value - you get to cook exactly what you want, how you want, when you want. For many, cooking itself is valuable (and not a loss of time) because it is enjoyable.
Another excellent example of why I've stopped listening to arguments of the form "X needs to be regulated because it produces such-and-such externality".
"Externalities" aren't just things you as an observer don't like. A negative effect on the buyer can never be an externality.
But eating out also causes negative externalities because the incentives between restaurant and food consumer aren't properly aligned.
Restaurants have every incentive to offer cheap, unhealthy, but more addictive foods because the resulting health issues are externalized towards the buyer and to the rest of society.
It's this incentive structure that gives rise to Supersized sodas, unlimited breadsticks at Olive Garden, etc.
One way to look at it is that the industrialization of food production (including cooking) is better at moving atoms around and making whatever people choose to eat cheaper, but worse at managing the bits of information that help people make wise decisions on what they actually should be eating.
It's also harder to verify that you got what you paid for -- my family used to go to the market every weekend to stock up, and you become intimately familiar with what's in season, what is fresh, and what tastes good, but it's easy for a restaurant to buy cut-rate produce and then dress it up with seasoning and technique.