Generally, they inflate prices (or take some % from the restaurant, so the restaurant has to increase prices).
And have a small delivery fee.
And have a small “city wants DoorDash to pay its workers fairly, so it’ll charge you an arbitrary amount extra” fee
And a bag fee.
And sales tax.
And a tip
Oh and don’t forget the service fee.
I’m not kidding, this is from a recent receipt. There are 6 fees PLUS the cost of the actual food.
Other delivery platforms are similar