Apple made the surprise announcement Friday it is making a $1 billion investment in Chinese ride-hailing app Didi Chuxing, which is Uber’s main competitor in China. It is unlikely Apple is interested in concerning itself with the ins and outs of the Chinese ride-hailing app market, but it has lots to gain from its big investment.

Didi Chuxing also doesn’t particularly need Apple. It already commands almost 90 percent of the market in China, where Uber is losing $1 billion per year to simply retain its slice of the market. While Apple's $1 billion is Didi’s single largest investment, the company’s current funding round is oversubscribed, and it has the backing of the deep pockets of Alibaba and Tencent.

That said, Didi was never going to turn down an investment from Apple, which brings with it so much more than a mere cash injection. For Apple, there are numerous upsides for an investment that won’t even make a dent in its $233 billion cash pile. Here are the biggest:

1. Insight into the Chinese market

Apple CEO Tim Cook last month said the company remained “extremely optimistic” about China, it’s second-biggest market by revenue. This was despite the company reporting an 11 percent decline in revenue from greater China in the first three months of 2016, compared with the same period last year.

Apple saw massive and rapid growth in China in 2015, which skewed the numbers for the first quarter of 2016 somewhat, but Apple needs to understand the market better if it wants to continue to generate significant revenue there.

In an interview with Reuters, Cook explicitly said this is one of the main reasons for the investment: “We are making the investment for a number of strategic reasons, including a chance to learn more about certain segments of the China market.”

“Working in partnership with local partners to enter new parts of the Chinese market is a common strategy for international companies looking to grow in China,” Jack Kent, an analyst at IHS Technology, told International Business Times. “As Didi operates across the Chinese market, not just on Apple devices, it could help Apple gain greater insight into the behavior of users beyond its own ecosystem.”

2. Winning over the Chinese government

Apple’s relationship with the Chinese government is uneasy at best. The launch of the iPhone 6 in China was delayed over regulatory issues, and despite constant denials by Apple — most recently in front of Congress — rumors continue that it shares iOS source code with the government in order to pass security checks.

Tim Cook Chinese Government Chinese President Xi Jinping (left) shakes hands with Apple Inc. CEO Tim Cook during a gathering of CEOs and other executives at Microsoft's main campus in Redmond, Washington, Sept. 23, 2015. Photo: REUTERS/Ted S. Warren

Most recently Apple saw its iTunes Movies and iBooks services blocked in China just six months after their launch, and this month Cook is expected to visit China to meet with the government there.

Investing in Didi could make these talks much more amicable, as the ride-hailing app has partnerships with the Chinese government, including the state-owned Beijing Automotive Group. That government has also pinpointed transportation as one of the key areas where homegrown technology companies can revitalize the industry, and considering Didi’s market domination, it is a smart investment by Apple.

3. Self-driving cars

Apple may not be telling anyone, but the company is widely reported to be working on its version of an electric (and possible semiautonomous) car, known as Project Titan. Just like Uber, all ride-hailing apps are looking at self-driving cars as a way to cut the annoying cost of having to pay their drivers.

Last month we saw Uber and Lyft enter a partnership with Google and Volvo to promote self-driving-car technology, and with Apple, Didi will obviously be keen to take advantage of whatever announcements are coming from Apple.

From Apple’s point of view, investing in Didi will give it a granular insight into exactly what the self-driving-car market will need, and using Didi’s drivers as guinea pigs could help it develop technologies such as mapping. “Taxi apps can also be a way into developing a wider automotive strategy, and this investment is further evidence of Apple’s interest in transportation, and perhaps the automotive market, beyond its current Apple Maps software,” Kent said.

4. Services

Cook’s visit may have been sparked solely by the shutting-down of iBooks and iTunes Movies in China. While these are relatively tiny parts of Apple’s portfolio of products,  in a world where smartphone sales are slowing, they are only going to get more and more important.

One of the reasons the Chinese government is said to have shut down Apple’s services is that it is all part of its push to wean China off foreign technology in a bid to develop its own companies competing in this area.

If Apple can show that it too is helping to build China’s homegrown companies, the government is likely to view it in a better light.

5. More money

Of course Apple is not a company to just throw away money for better relationships with the Chinese government and insight into a market it is relatively unfamiliar with. There is a reason Didi’s current funding round is oversubscribed, and that is because investors believe there is money to be made on a company that is now reportedly valued at $25 billion, up from $16 billion less than one year ago.

As organic growth within Apple becomes harder to achieve, outside investment becomes a means to grow. As Cook told Reuters: “Of course, we believe it will deliver a strong return for our invested capital over time as well.”