They generally do, in these apps: they also pay a fee to the delivery company for each order they get (~15% for Uber eats), and they pay it because they get more business if they're available for delivery, especially on the centralised apps, and it's cheaper than having their own delivery drivers.
(A lot of restaurants will offer a discount if you order from them directly instead, to try to incentivize repeat customers to avoid the middleman, or just straight-up have lower pricing on that menu)