How were they selling a dollar for 80 cents? The actual food is more expensive on grubhub than ordering through the restaurant, and then there are multiple fees on top of that.
Tons of marketing/advertising. The free GrubHub+ subscription through prime probably burned through a lot of cash. I doubt Amazon was paying them very much (if anything) to Grubhub. Then you have all of the corporate staff (around 3k based on google search) who are highly paid.
And the competition from UberEats and Doordash, who also are constantly promoting discounts, free orders, etc. so there's almost no way they can recoup actual costs let alone turn a profit.
But there is the cost of hosting, developers, drivers, etc.
And that's all cost that is not borne by the restaurant.
And there is a limit to how much people would pay to get something delivered. So they're probably pricing the delivery, etc less than they've actually paid.
We've seen this before and we'll see it again. There are lots of people who will pay for things below cost. Sometimes that cost comes down but a lot of the time it does not especially in relatively affluent countries. I don't have a personal driver or chef like I might have in some places. I do have some other house/yard services but very occasionally and I consider them luxuries.
I always wondered if the promotions were handled with restaurants more like "we (the platform) recoup our promo losses via the regular platform fee you (the restaurant) pay regardless" or more like "if a customer uses a promotion, we (platform and restaurant) split the loss, unrelated to the regular platform fee". Like when I use a platform promo for reasons well beyond trying a new place for the first time, am I screwing the restaurant, the platform, or some combination?
Mostly the restaurant, at least in the case of these companies' "free delivery" membership deals. Restaurants pay a higher commission on those orders. (Whether that's enough to outweigh the operating deficit built into their current pricing I have no idea, but some fraction is being passed along to their merchant "partners".)