Apparently DoorDash had a glitch that made everything free. Of course, lots of people took advantage of it. DoorDash is now charging people for their orders, some of which were for several thousand dollars worth of goods. Who is legally "right" and who is "wrong"? Presumably it was not legal to take advantage of something like this that was obviously unintentional, and DoorDash has the right to collect the money?
tl;dr: DoorDash can probably void the contract, and not perform the service (delivery) for the price advertised. However, if they have already delivered the product, they are entitled to restitution, but cannot charge full price unless the customer agrees.
Contract is voidable
Legally, this would be considered a unilateral mistake (made by DoorDash) when entering into the service contract.
In the USA, contract law is generally governed by state common law, so details may vary between states.
However, usually contract law allows voiding a contract because of an unilateral mistake, if the other party knew (or should have known that there was a mistake:
Unilateral mistake as to the terms of the contract
The three requirements that will render a contract void for unilateral mistake in relation to the terms of a contract are:
- One party is mistaken as to a term of the contract, and would not have entered the contract but for this mistake
- The mistake is known or reasonably ought to be known to the other party
- The mistaken party is not at fault
The site goes on to cite a case similar to this question (Chwee Kin Keong v Digilandmall.com Pte Ltd  1 SLR(R) 502), where a computer printer was accidentally priced too low on an e-commerce website. The court held that the contract was void for mistake.
One crucial element is the last part (mistaken party is not at fault). This is generally interpreted to mean that the mistaken party was not grossly negligent in making the mistake. So if the wrong price was caused by gross negligence on DoorDash's part, the contract might not be voidable. Whether this is the case would need to be decided in court.
Consequences of voiding the contract
As explained above, DoorDash can probably void the contract due to their mistake. However, that does not mean they can just charge full price.
Voiding the contract means basically winding back things as if the contract had never been entered into. This usually means each party must return anything they received.
So DoorDash could ask the customer to return the delivery. The can offer to charge their regular price instead, if the customer wants to keep the delivery, but they cannot demand full price.
If returning the delivery is not practical (e.g. for perishable items, or food that has already been eaten), DoorDash is probably entitled to restitution, which in this case would mean money. Generally, restitution means paying the money value of the benefit received. Whether the DoorDash delivery is indeed worth the full price, or whether the value is actually lower, is something that a court would have to decide.
Terms of service
To avoid the legal uncertainties mentioned, most businesses address the problem in their Terms of service (TOS).
I did not find anything addressing mistakes of fact in DoorDash's TOS. However, the TOS does say:
(s) You will report any errors, bugs, unauthorized access methodologies, or any breach of our intellectual property rights that you uncover in your use of the Services.
DoorDash may argue that customers violated the TOS by taking advantage of the obvious pricing error, instead of reporting it.
According to Business Insider :
A spokesperson told Insider: "On the evening of July 7th DoorDash experienced a payment processing issue, and as a result, some users were able to check out without an authorized form of payment for a short period of time. We were subsequently notified that some users were placing fraudulent orders, and we immediately corrected the issue.
which suggests a valid legal argument that a contract had been established. With this interpretation, orders were not "free", and payment could be collected later.
The reference to fraud (for "some users") would involve DoorDash demonstrating that those users had had no intention of making the payment. A good defence would be that the user had intended to make payment - at a later time if thwarted by technical problems - though that would mean the contract was valid and enforceable (or subject to breach).
There seem to be [at least] two mutually exclusive interpretations - either an intention to defraud, or an obligation to make payment.
I've not found anything that would have suggested to the users that no payment would be due (though I'll edit if that's wrong) - just that it was not collected at the usual time by the usual processes.