I think the trick here is that Doordash isn't charging the customer $x + $y, but $x - $y. X
minus Y. That is, they're subsidizing the delivery - in order to generate demand, and then come to the restaurant with the data to convince them to sign up for 1). This was actually mentioned at the bottom of the article.
So in this story, 'JumpCrisscross paid $x-$y = 5k for an order to a homeless shelter, but the real, restaurant price for that order $x=20k, which means DoorDash has just subsidized the transaction for $y=15k. The restaurant got an extra $20k of business that day, and 'JumpCrisscross bought $20k worth of food for a shelter at 1/4 the price.
And the best part, they could probably do it again :).
EDIT: Reading the article again, it seems to me Doordash is supposed to be charging the customer $x in the lead generation phase; so perhaps the -$y part is a scrapper error.