They ensure that the food is edible by working with restaurants that customers already dine-in at. Sure, they can't guarantee that the food is edible, but no delivery service can guarantee anything about the product that they are delivering. They have to rely on the reputation of the sender.
The problem is instead that this is too common of a business model. There doesn't appear to be anything particularly innovative about what DoorDash is doing, and they don't appear to be executing very well. It's not a fundamentally flawed business; it's just a uninspiring one that was probably overvalued.