All stocks require research before buying. But sometimes after research, I conclude that a company isn't ever worth an investment -- no need to circle back in the future. Some businesses simply burn cash, will burn more cash with scale, and continually dilute investors to pay the bills. I believed Uber Technologies (UBER -0.38%) was going to be one of those companies after I researched it in 2019.

I was wrong. In 2023, Uber generated nearly $3.4 billion in free cash flow. And that wasn't the result of a fancy accounting maneuver. On every profitability metric -- operating income, net income, cash flows, you name it -- Uber was a profitable company. In fact, Uber's free cash flow in 2023 was a record. Moreover, it's the continuation of a multi-year steady improvement.

UBER Free Cash Flow Chart

UBER Free Cash Flow data by YCharts

In reality, when I wrote off Uber, I also wrote off the entire third-party delivery space. That includes food-delivery platform DoorDash (DASH 3.12%). But now that Uber proved me wrong, I wonder if DoorDash can pull off the same radical transformation.

First, I need to explain what Uber did to become a cash-flow machine. Then I'll explain why DoorDash is well-positioned to make an Uber-like move.

Why Uber is a cash-flow machine now

When Uber went public in 2019, management was out of control with its spending. As one example, it spent $4.8 billion on research and development in 2019, which was 70% of its gross profit. That included spending money on an electric flying taxi service with dubious prospects. Uber also invested a ton of money in other similar companies, including an investment in Chinese ride-sharing company DiDi, which was valued at $8 billion in 2019.

I assumed Uber would always be reckless with its money. But the company changed. In 2020, it got rid of its flying-taxi ambitions, which partly explains how it greatly reduced its research-and-development expenses. And the company eventually got rid of unnecessary investments. By the second quarter of 2022, this heightened operational discipline led to positive cash flows.

Therefore, cash flow was already headed in the right direction when Uber decided to monetize its then-122 million monthly active users by launching digital advertising in October 2022. And considering it already had the digital platform built, this was a high-margin addition to the company. The following chart shows that Uber's net income saw a pronounced jump shortly after it launched advertising.

UBER Net Income (TTM) Chart

UBER Net Income (TTM) data by YCharts

The takeaway seems to be that Uber's management matured and started making better use of its financial resources. Then the company found high-margin growth avenues that took its cash flow to the next level.

DoorDash is on the same path

In reality, DoorDash's cash-flow potential isn't just theoretical; the company is already on the same path that Uber took. In 2023, DoorDash had free cash flow of $1.3 billion.

Looking at the numbers for DoorDash, we can see that management became more disciplined, just as Uber's did. The following chart shows that gross profit increased more rapidly than revenue in the past year, a combination that helps boost profis. And it's kept its operating expenses subdued, leading to its record cash flow.

DASH Revenue (TTM) Chart

DASH Revenue (TTM) data by YCharts

For 2024, DoorDash's management says it needs to "innovate to build entirely new products, services, and processes." And for one of those innovations, it will keep developing what Uber did: digital advertising. DoorDash already started working on digital ads on its platform. And granted, digital ads won't have quite the same upside for the company, considering DoorDash has only 37 million monthly active users, compared with 150 million for Uber.

Still, DoorDash is starting to look like a future cash-flow machine, which would be a great thing for the stock. Management is learning operational discipline, and it's developing higher-margin revenue streams. If the trends continue, then DoorDash's free-cash-flow record in 2023 will be repeatedly smashed in coming years.

For me, it's a good reminder to circle back to stocks that I previously researched to see whether anything has changed. With both Uber and DoorDash, both businesses changed for the better. And shareholders could keep reaping the rewards for years to come.