Except the food cost is only a small part of what we are paying for at a restaurant. What we are paying for is the worker's time and skills. We could, mostly, eat the same ingredients at home for much cheaper.
A lot of the other costs are small and make profit in scale.
Cooks wages are integrated into the price of the food, and the waiter's are not. But some times cooks are tipped out too.