> Can a court force a company or an individual to create something that does not exist?

You know, all this discussion has reminded me of the fact that what we know as "corporations" today descend from the historical concept of "charter companies"—literally, corporations the government brings into being to serve the public good through private enterprise (in modern terms, to increase GDP), with an expected finite lifetime.

The "charter" of such companies was both a little law that individually granted the company a set of group rights, but also a statement of purpose and boundaries: both an enumeration of what the company should pursue (e.g. profit through importation of trapped furs), and what it shouldn't (e.g. profit through actually trapping those furs oneself; profit through trade of sugar-cane; a monopoly; colonial expansion; lobbying...)

It seems to me that the crux of the issue, here, is that we think that somehow the American corporation is no longer a thing that is brought into being by the state to serve the public good, but rather something private individuals have the right to bring into being for their own purposes, with the state having no say except insofar as to make certain corporate practices illegal.

In other words, we now do think of corporations as people—or more specifically, like the children of people. As with children, everyone seems to think they have the right, with no government interference, to create a corporation; everyone seems to think they have the right to guide and "raise" their own corporation however they wish; everyone seems to think it's perfectly okay if their corporation does things that benefit it at the expense of the state, as long as none of those things are explicitly declared illegal; etc.

In the historical model, none of this was true; corporations were the "children" of the state itself, raised to pursue its goals—with the CEO and directors taking a stewardship role, guessing what the state would prefer and executing on that. If they were ever wrong, they'd be punished—historically, by simply having the corporation disbanded at the whim of the king. (Also, probably, the board of directors would be punished as individuals; chartered companies had no concept of limited liability.)

Chartered companies still sort of exist:

• Many countries have "crown corporations"—like chartered companies, these are brought into existence and given a mission by the government—but they effectively have the government sitting directly on their board with voting rights, and often their cashflow happens through the state treasury. (And other modern corporations, although not explicitly set up this way, can be thought of as effectively crown corporations—China's airlines, for example, are explicitly owned by the Chinese government as majority shareholders, although in theory those shares could be sold.)

• More interestingly, in some countries (e.g. Britain, India, Canada) there are municipal corporations: cities, townships, etc. are brought into being using exactly the same sort of "charter" as historical charter companies, and run with exactly the same goal: to further the interests of the state that created them, with the municipal "government" (actually a CEO and board of directors—"mayor" is just a cute title that is meaningless to the law) acting in a stewardship capacity.

---

To get to the point: if the California State Legislature wanted to (at the behest of the FBI), they could just change Apple Inc.'s charter to make "doing everything possible to aid FBI investigations into data held on, or passed through, Apple-produced devices" an overriding concern above corporate profit.

Charters are a thing given by the state to the individual, just like, say, copyrights are. Like copyrights, they are brought into being to further the public good. The benefit to the private individuals holding a corporate charter (like the benefit of having a copyright) is a cost the state has decided is worth paying, to get the resultant benefit to the public good. But the state gets the final say: it can revoke or modify whatever it likes if it doesn't think the public good is being served.