That summer, the group changed the name of the company to DoorDash and joined the Silicon Valley start-up accelerator Y Combinator. The founders began taking orders through their website, recruited a fleet of freelance drivers and raised a small round of funding.

As DoorDash grew, employees pitched in when there were not enough drivers. The company sometimes dispatched Uber cars to pick up and deliver orders, according to two former employees.

To compete with other companies offering takeout, DoorDash expanded its selection of restaurants it delivered from by adding ones that had not signed up to be part of its listings. DoorDash said it had hired international call center workers to call in the orders, and it has told drivers not to tell the restaurants they were with DoorDash. Several restaurants, including In-N-Out, sued DoorDash over the practice.

When it enters a new market, DoorDash adds restaurants that have not signed up for delivery as a way to show restaurant owners the value it can bring, Mr. Xu said.

“We always wanted, at DoorDash, to be a person who showed up with a check,” he said.

Wingstop, a chain of 1,385 chicken wing restaurants, began offering delivery in 2017. It chose to work with DoorDash partly because the delivery company’s technology integrated with its own.

“I had some skepticism as to whether it would work,” said Charlie Morrison, Wingstop’s chief executive. “We experienced strong delivery sales out of the gate.”

Mr. Xu’s peers describe him as competitive and determined. Once a year, he and Mr. Tang, now DoorDash’s chief product officer, race each other in a sprint. When Mr. Xu and his now wife were dating long distance, he bought 12 plane tickets at the beginning of the year to ensure they would see each other once a month.