In early 2016, Apple won plaudits from internet privacy advocates and civil libertarians when it refused the FBI's request and a judge's order to unlock the iPhone of San Bernardino, California, shooter Syed Farook. The tech giant claimed the government order amounted to hacking its own users and would require Apple to create software that doesn't exist.

Eventually, the FBI was able to use a third party to access the smartphone, but not before igniting a debate about personal data security and possible implications for law enforcement.

The ordeal also cemented Apple's corporate perception in tech as a guardian of personal privacy, a bulwark against potentially intrusive government actions. This is a contrast with main smartphone operating system rival Google, which has a reputation for gathering massive amounts of user data for advertising and search purposes.

Apple loyalists, therefore, might have been a bit surprised in recent weeks when the company removed virtual private network (VPN) apps from its App Store in China. Those VPN apps prohibit government tracking and help iPhone and iOS users in China get around content blocked by the country's notorious censors.

According to Chinese app site via, some 400 VPN apps have now been removed by Apple. That number is up significantly from the 60 pulled apps when the VPN crackdown was first reported.

It certainly comes off as hypocritical for Apple to have stood up to the U.S. government in the San Bernardino case yet accede to the Chinese government's "Great Firewall," potentially depriving millions upon millions of the free exchange of information just about anyone in America with a broadband connection or smartphone can access. However, the Cupertino, California, behemoth has both judicial and commercial reasons for blocking VPN services.

Last year, China’s parliament — an organ of the ruling Communist Party passed a sweeping cybersecurity law. According to CNBC Beijing correspondent Sophia Yan, the law will "make it even harder to do business in China by increasing costs to foreign firms, exposing multinationals to cyber-espionage, and giving domestic companies an unfair edge."

That law went into effect June 1, with businesses from the U.S. and European Union very confused about what the legislation fully entailed. But what is known about the law is that Beijing could levy huge fines at businesses not in compliance or even kick them out of the country entirely.

Then, there's the issue of Apple's standing in the Chinese market to consider. Mere days after news of the VPN blocking broke, Apple released its China revenues for the third quarter, which were down 10 percent year-on-year. Analyst Neil Mawston of Strategy Analytics claimed that the iPhone had now "gone out of fashion" in China.

Additionally, Apple last month committed to building a data center in southwest China, investing $1 billion in a province of the country designated by the government as a big-data hub.

For his part, Apple CEO Tim Cook bristled at suggestions that Apple was setting a double standard after the San Bernardino controversy just 18 months ago.

"In the case of the U.S., the law in the U.S. supported us. It was very clear," Cook said on the company's Aug. 2 earnings call. "In the case of China, the law is very clear there. Like we would if the U.S. changed the law here, we have to abide by them in both cases. That doesn't mean that we don't state our point of view in the appropriate way, we always do that."

Regardless of Apple's legal opinions, it's clear that the company has made a calculation that it needs its sizable Chinese consumer base, despite losing ground in the mobile sector to China-based rivals like Huawei and Xiaomi. That means playing under the Chinese government's rules.