There is a big markup on the ingredients to make a meal.
When you go to a fast food place you are actually paying for the convenience of not making it yourself. Fast food restaurants are not competing against other fast food restaurants, they are competing against the consumer deciding if the cost of a hamburger at a fast food place is worth the 30 minutes (or less) of time for them to make it at home.
Yes, the overhead is challenging, but the waste is minimal. I think the prices at delis in grocery stores is far more shocking, and waste has to be a big part of that.