DoorDash contractors have turned a forced arbitration clause in their contract against their employer, as a federal judge has ordered DoorDash to arbitrate 5,010 labor disputes, potentially costing the company millions in arbitration fees (via Quartz). And in a rich bit of irony, DoorDash essentially brought this situation onto itself.

The DoorDash workers originally sought arbitration because they felt DoorDash violated federal and California labor law and wanted to settle the dispute. DoorDash argued it was under no obligation to pay the fees needed to arbitrate those thousands of disputes.

But DoorDash also originally hoped to dismiss a pending class-action case about the same dispute by arguing that the workers had a duty to arbitrate. In other words, the company’s trying to have it both ways.

The irony of the situation was not lost on Judge William Alsup:

The employer here, DoorDash, faced with having to actually honor its side of the bargain, now blanches at the cost of the filing fees it agreed to pay in the arbitration clause. No doubt, DoorDash never expected that so many would actually seek arbitration. Instead, in irony upon irony, DoorDash now wishes to resort to a class-wide lawsuit, the very device it denied to the workers, to avoid its duty to arbitrate. This hypocrisy will not be blessed, at least by this order.

You can read the judge’s full decision here.

Last year, DoorDash also got in hot water after drivers complained about its policy of taking their tips to cover their pay. In August, the company changed that policy, saying that drivers would get 100 percent of their tips and it would increase base pay.

Judge Alsup is no stranger to cases involving big tech companies, by the way — he presided over parts of Oracle’s lawsuit against Google over whether or not Google took code from Oracle. You can read The Verge’s 2017 profile of him right here.

Forced arbitration is a common and contentious issue in the tech industry that doesn’t just affect contract workers. One of the demands of the Google walkout was to end forced arbitration, and the search company ended that policy last March. Riot Games employees staged a walkout to protest the gaming studio’s forced arbitration policies last May, and Facebook ended forced arbitration for sexual harassment complaints in November 2018.