GrubHub and DoorDash are adversarial extractive operations, and it is not in the best interest of any restaurant to deliver through them. They already squeeze all or most of the profit out of anything they pickup and deliver.
Sadly, many restaurants don’t have a choice, in these days of COVID-19. They work with GrubHub and DoorDash at zero profit or even a loss, or they go completely out of business. Those are the only two options.
So, it’s no wonder that the restaurants wouldn’t want to provide bathroom facilities for the drivers.
Uber is just as bad (or worse), but they’re in a slightly different line of business, unless you’re talking about UberEats.