Eating out shouldn't have to be more expensive than eating in. And in many countries it isn't.
Restaurants benefit from scale that your kitchen doesn't.
If you were feeding a family of 150, your per-meal price would crater.
Of course a restaurant has to pay staff, so the numbers have to add up, but conceptually, there's no particular reason why a chicken sandwich at a restaurant should cost more than a chicken sandwich at home, as long as that restaurant is serving chicken sandwiches, chicken tacos, and chicken pasta all afternoon/evening.
Granted during covid and shipping shortages all bets are off.
And obviously even during non-covid times, restaurants can set their own prices, charge a 100x multiple for exclusivity, ambiance, etc.
But fundamentally there's no obvious reason why getting food at a restaurant needs to cost more than getting food at home, while still making the restaurant a profit that lets them pay salaries and sustain their business.