DidiAppApple this week invested $1 billion in Xiaoju Kuaizhi Inc., known as Didi — by far the dominant car-hailing service in China with 300 million customers. While Apple has long admitted being interested in car technology and has deals to put Apple technology into many car lines, this particular investment seems to have been a surprise to most everyone. Analysts and pundits are seeing the investment as a way for Apple to get automotive metadata or even to please the Chinese government. I think it’s more than that. I think it is a potential answer to Apple’s huge problem of foreign cash and a grab for leadership in what may well be the second automotive age.

Apple has about $200 billion in offshore investments. That number is continuing to grow yet making very little return compared to Apple’s phone and computer businesses. As I’ve written before Apple has been very good at leveraging its cash to get better terms from suppliers but that game isn’t going to be getting any better (or worse) and the cash continues to pile up.

So Apple keeps mentioning (hint-hint) a tax holiday that would allow them to bring all that money back to America while paying less tax on it. But a tax holiday hasn’t come. One might well happen if Donald Trump is elected but that’s too much of a crap shoot for Apple. Hillary Clinton might have done it, too, but Bernie Sanders has forced Clinton into a more populist position where she probably can’t be perceived as doing favors for corporate America.

If Apple can’t bring those billions back from overseas they at least want a better return. The Didi investment makes sense for all the reasons other writers have mentioned — Chinese relations, metadata, important Apple market, something behind Door Number Three having to do with self-driving cars — but there’s a lot more to it than that.

Why invest in Didi and not Uber? The major reason is because Uber is based in San Francisco — it’s an American company and so that $1 billion from Apple would have to come from Apple’s much smaller domestic cash stash. Also Didi’s valuation is less than half of Uber’s which means Apple gets more company for its money.

Think about it: which company is likely to ever grow 10X in value? Not Uber. 10X would be $625 billion — worth more than Apple, Google or any other company anywhere. For Didi, 10X is $265 billion — still a lot but more realistic, especially for a company that’s totally dominating the second largest world market for its services.

Another company that won’t grow 10X ever is Apple, itself. So if Cupertino wants capital gains, the better company to invest in is Didi, not Uber or Apple.

Now there are two more important points to make here. One has to do with cash and the other has to do with self-driving cars. Apple has the ability to finance any level of growth for Didi. If Didi wants to enter new markets, if Didi wants to assume financing obligations for new cars. If Did wants to — and this is the big one — buy Uber competitor Lyft, they can get Apple to finance it all from Apple’s stash of foreign cash. This is without regard to economic conditions in either China or the USA. If Apple wanted to buy Lyft directly they’d have to borrow or use USA cash. Helping Didi buy Lyft is a different story.

Yeah, but where are the self-driving cars? This is definitely the future and I think Apple is using this Didi investment to take a lateral run at the problem. Self-driving cars are going to be huge but the early market will also be problematic. Laws will have to be changed, people will die in accidents — it is going to be a mess for awhile. But not a mess in China.

Here’s a country where people mainly don’t drive private cars yet and where the government is autocratic (pun intended). The Chinese government, if it sees an opportunity to assume a technical leadership role, will very quickly throw its weight behind self-driving cars. And just like third-world countries tend to have better mobile phone service than landlines, the newer technology will quickly dominate because it will be entering something close to a vacuum.

Think of China as a billion-passenger test market for self-driving technology. It will bolster the Chinese auto industry, help the domestic financial sector, decrease pollution, and even help the housing market. Private cars probably won’t be the norm in China, either. And every one of those Didi self-driving cars will include Apple technology.

Only when the Chinese market has stopped having growing pains and freak accidents will Didi’s self-driving technology come to the USA and Europe. And along the way Apple will be buying more and more of this likely success story. It’s Apple’s unique way to solve a financial problem and at the same time buy a leadership position in the second automotive age.