I understand that 30% sounds like a lot, but this is a bit of "pie slicing" thinking, instead of "pie growing".
The 30% that Doordash/Uber Eats charge pays the cost of delivery and customer service. It's not free to provide food delivery.
The restaurants could attempt to provide the service themselves, but there's no real reason to think they can provide a better service at a lower cost than Doordash. If they could, then Doordash wouldn't exist.