Because as a matter of fact, restuarants have been employing (paying wages) to emplyees who's role is to deliver food. They charge a delivery fee which they have rationalized will cover this "cost", and then have historically fell on the consumer to actually pay the driver.
if delivery where NOT offered by these traditional restaurants, they would have gone out of business. Typical market force at work here, nothing new; needing to modify service to increasee value proposition.
Now, Food delivery apps came in and promised restuaranteurs that they could remove the pesky delivery drivers, but still keep those sweet seeet delivery-meal profits. That is of course, until all these apps just sucked money from both the restaurants AND the drivers.
So, Why should the restautant cover the cost of delivery? Because, they provide a historical good and service, which they outsourced, and now everyone loses. They would make more money if they went back to handling employment of drivers. It's way easier for me to pay a 2 dollar deliveyr fee and 5 dollar tip when I know that there isn't another an arbitraty app in the middle collecting my money.
edit: to explain my ramble, I haven't had food delivered since like college because it's so confusing/a money grab. To order delivery from the pizza place I've gone to since I was a kid, I need to download an app and pay twice as much? And they make less? Why?