I have to believe that a large portion of delivery markup is price discrimination. Restaurants have long looked for ways to charge more to people who are willing to pay more, but have been largely unable to because everyone gets the same menu. Delivery provides a convenient way to weed out those that will pay more by letting those who aren't pick up the food themselves.