A year ago, DoorDash Inc. looked like just another meal delivery app maker on its way out. The company was burning cash as it struggled to differentiate its software from that of Uber Eats, GrubHub Inc., and other competitors, and it had recently sold shares that valued the company at less than its previous funding round. Then something strange happened: Excluding overhead expenses such as salaries and rent, DoorDash started turning a profit. Granted, that’s a generous definition of the word “profit,” but it was enough for Saudi-backed SoftBank Group Corp., which swooped in to lead a fresh round of investment totaling $535 million.