Selling a car today gives Tesla the full profits of that hardware production today. Running that car as a robotaxi means that Tesla eats the costs of the hardware today in exchange for a larger total profit collected over several years.
So operating a fleet gives the company access to more long-term profits at the cost of decreasing the bank balance today (negative cash flow), where selling the cars lets the company fill the bank account right now (positive cash flow) at the cost of limiting long-term profitability.
The decision to prioritize immediate cash flow vs long term profits depends on the financial position and overall strategy of the company.