Apple CEO Tim Cook will be spending the afternoon of November 20th making conversation with President Donald Trump. The two are scheduled to tour a factory in Austin, Texas, where Apple is manufacturing its new Mac Pro. The president does this kind of photo op all the time as a way of promoting US manufacturing jobs (recent trips include a Louis Vuitton workshop near Dallas and a paper mill south of Toledo, Ohio), and Apple seems to be eagerly playing along. This morning, the company sent out a press release touting its new Austin campus and boasting that it is “on track to contribute $350 billion to the US economy between 2018 and 2023.” These are the kinds of statistics that Trump desperately needs as his trade policies stall out amid fears of a recession — and Apple seems happy to provide them.

If you haven’t been tracking Cook’s social calendar, you might be surprised to see Apple stepping into politics in this way. Without a content empire to moderate or an ad network to maintain, Apple has largely stayed out of the contemporary political maelstrom, which has done so much damage to Google and Facebook. Apple doesn’t have Amazon’s reputation for ruthless capitalism or Microsoft’s reliance on government contracts, and it’s generally cultivated a principled nonpartisanship.

It’s an ugly deal in many ways, but it has worked out very well for Apple

But while Amazon CEO Jeff Bezos openly feuds with the president (and Facebook keeps its outreach well below the C-Suite), Cook hasn’t been shy about meeting publicly with Trump. The president has reciprocated, mentioning Cook in dozens of public statements in the three years since he was elected. Beyond public meetings, the two men appear to be in regular contact. Trump boasted about having dinner with Cook as recently as August, and he says he regularly receives direct calls from the man. “Tim Cook calls Donald Trump directly,” Trump told reporters in August. “That’s why he’s a great executive because he calls me, and others don’t.”

That relationship has paid off immensely for Apple. The company entered 2017 with more than $230 billion in offshore holdings, waiting for a Republican president to lower corporate taxes so it could be brought into the US at a substantially lower rate. At the same time, Trump’s trade war with China could have had devastating consequences for Apple, which relies more on Chinese manufacturing than any other US tech companies. In both cases, Apple has emerged with exactly what it wanted by appealing to the narrow, transactional politics that have become Trump’s trademark. It’s an ugly deal in many ways, but one that has worked out very well for Apple.

In fact, Trump has been cultivating Cook since before his inauguration. A few weeks after Election Day, Trump invited Cook to Trump Tower for a tech summit, alongside Larry Page, Jeff Bezos, Sheryl Sandberg, Elon Musk, and Peter Thiel, among others. In the wake of the Muslim ban, Musk was heavily criticized for cozying up to Trump — I called him a crony capitalist — but somehow, Cook never came in for the same criticism. Apple joined a lawsuit against the new immigration restrictions shortly after, and Cook sent an open letter to employees making his objections clear. But in the years since, he’s been a regular presence at White House events, touting US manufacturing, investment, or other administration priorities. (And yes, on occasion, Trump has gotten his name wrong.)

Trump has repeatedly touted Apple’s $350 billion investment promise

In Trump’s speeches, Cook often plays a more aggressive role. In speech after speech, Trump has cited the $350 billion figure as evidence that the trillion-dollar corporate tax cut he passed in 2017 is spurring investment. Outside of anecdotes, there’s no evidence that the tax cut is doing anything to boost business, but Apple’s numbers make it easier to make the pitch. And since Trump’s cut saved Apple tens of billions of dollars in corporate taxes, Cook is happy to help put it in a good light.

Trump’s remarks at a mayors’ summit in January 2018 offer a good example of his spin on the investment, which has become a staple of his rally speeches:

You probably you heard me on the trail — I’ll say, “I will not consider this job complete and great, in terms of economics and the economy, unless Apple someday starts building some plants in our country.” And what happened is they said, $350 billion. And when I first heard it — Tim Cook and I spoke. But when I first heard it, I said, “I guess they mean $350 million” — because that’s a big plant. You know, $350 million, you can build a lot of plant. But they said, “No, sir, $350 billion.” And much of that comes from overseas. They’re going to bring it back because of the tax bill because we made it possible for them to bring it back. And they’re investing a lot of money over and above that. So it’s $350 billion and thousands and thousands of new jobs. They’re going to build an incredible campus. It’s going to be something special.

This is wrong in a couple of different ways. Apple is not building any manufacturing plants in the US for the simple reason that Apple doesn’t manufacture its own devices, instead relying on a network of subcontractors around the world. The plant Trump is touring today is owned by Flex (formerly Flextronics), which has assembled the Mac Pro since 2013 and will continue to assemble the new model. So there are no new plants being built, and Apple isn’t contributing any more or less to US manufacturing than it did under President Obama. Apple is building a new campus in Austin, but it’s not going to cost anything like $350 billion. In fact, much of the repatriated money is going back to people who own Apple stock and who have already done pretty well for themselves.

While Apple is being used to prop up the tax cut, Cook seems to have been focused more on trade policy. iPhones are still mostly manufactured in China, which means Apple will suffer immensely if the proposed electronics tariffs are ever actually put into place. And reporting suggests that Cook has steered Trump away from putting those tariffs in place, making the valid point that it will put US companies like Apple at a disadvantage to foreign competitors like Samsung. Trump’s trade war could have been disastrous for Apple, which is more reliant on Chinese manufacturing than any other US tech company. So far, the company has escaped mostly unscathed, and Cook’s strange, transactional relationship with Trump may be a big part of why.

If you’re inclined to be idealistic about Apple, it’s hard not to feel disillusioned

However, Cook does not seem to have been a Trump supporter. He donated more than $250,000 to Hillary Clinton-affiliated groups in the 2016 cycle, and his donations to Republicans have been Trump skeptics like Paul Ryan and Rob Portman. (Federal Election Commission records show Cook swearing off political donations in the years since 2016, perhaps aware of the potential blowback.) So all of this has the feeling of someone holding their nose and doing what is necessary. Trump gets a few photo ops and some reflected light from the Apple halo, and Cook gets a chance to protect his company, so long as he plays Trump’s game.

These are the kinds of compromises powerful people make all the time. Apple is a trillion-dollar company with more than 100,000 employees; Cook’s job as CEO is to ensure the success of that enterprise, regardless of the political obstacles or personal disgrace. Compared to the moral tribulation of storing iCloud data on Chinese government servers, a few photo ops with Trump is a small price to pay. A spokesperson for Apple did not respond to requests for comment.

But if you’re inclined to be idealistic about Apple, it’s hard not to feel disillusioned. At every Apple keynote, we’re treated to inspiring videos about Apple’s progressive vision of the world, full of diverse faces and progressive dreams. Those images are worlds away from the surreal carnage Trump describes in stump speeches or the paranoid belligerence he’s brought to the US border. Faced with the startling challenge of the Trump era, Cook’s response has been to push for tax cuts and tariff exemptions. For a company built on changing the world, it looks an awful lot like giving up.