Apple CEO Tim Cook put himself and his company front and center in a national debate on digital privacy, when he decided Apple would not comply with a federal court order to help unlock an iPhone used by one of the San Bernardino terrorists. The Department of Justice has accused the company of using the case as a marketing opportunity.
But a look at Cook's record running Apple since 2011 makes his motivations appear more nuanced and his confrontation with the federal government inevitable.
Cook gave a speech at a cybersecurity summit in Palo Alto last year organized by President Obama at a time when tech companies were on edge following Edward Snowden's revelations about hacking by the NSA.
"If those of us in positions of responsibility fail to do everything in our power to protect the right of privacy," Cook told the audience, which included President Obama, "we risk something far more valuable than money. We risk our way of life."
And there are instances where Cook has not been afraid to confront the government on issues he considers morally important. Last year he wrote an op-ed in The Washington Post speaking out against state legislation that he believed would let businesses deny services to gay, lesbian and transgender people. Cook himself came out as gay in the pages of Bloomberg Businessweek.
"Tim Cook is much more comfortable than many CEOs taking stances on issues that impact all of us," says Neil Cybart, an analyst who founded AboveAvalon.com, which follows Apple.
Under Cook's leadership, Apple is now using 100 percent renewable energy in the U.S. and China. And it's worked to improve conditions at its manufacturing plants in China. "It's about trying to tell the world certain ideals that represent Apple," Cybart says.
Even under Apple founder Steve Jobs, the company did emphasize values — remember the "Think Different" ad campaign that used pictures of the Dalai Lama, Amelia Earhart, Mahatma Gandhi and other icons. But Jobs focused on the integrity of Apple's products.
Erik Gordon, a professor at the University of Michigan Ross School of Business, sees a change under Cook.
"Apple's a different company," Gordon says. "It just doesn't seem to have that excitement that it used to have. The new products are not knocking people out, and the CEO is not providing that kind of leadership."
Under Cook, Apple does have a new product line with the Apple Watch. But, it hasn't generated the kind of excitement that the iPod, iPhone or iPad did.
Still, Cook can't be called a failure. Under his leadership the company released a larger version of the iPhone to record sales. Kellie McElhaney, a professor at UC Berkeley's Haas School of Business, says Cook has a great team of people, and unlike Jobs he delegates.
"Let's not forget, he's not operating alone," McElhaney says. "He has a very intelligent, quite capable, quite successful senior leadership team who's obviously at the table with him. He's got a trove of advisers."
This week protesters lined up in front of Apple stores nationwide to show support for the company's stance on privacy.
Malkia Cyril of the Center for Media Justice says, as an African-American activist, she's aware of a history of government surveillance of black activists. And that's why Apple has her support.
"What makes sense to me is that encryption is good business," says Cyril, an iPhone user. "That's the bottom line. Keeping customers safe is good business, and if Apple knows that, good for them."
In many ways Cook has been saying that, and more for many years. He's said you don't have to choose between doing good and doing well.
But only a few dozen people were lined up outside the Apple store in San Francisco — that's nothing compared to the hundreds and thousands that line up for new products.
Cook is taking a gamble here: Polls remain divided on whether Apple has the support of the American people.