"I think Apple feels like it has to fight it because Apple has guaranteed privacy to everyone. Suddenly, they can't just turn around and say,'The government wants it; we're just going to undo our view,'" Cramer said on "Squawk on the Street."
On Tuesday, Magistrate Judge Sheri Pym said Apple must provide "reasonable technical assistance" to investigators seeking to unlock the data on an iPhone 5C that had been owned by Syed Rizwan Farook.
In response, Cook said in a letter to customers that "the implications of the government's demands are chilling. If the government can use the All Writs Act to make it easier to unlock your iPhone, it would have the power to reach into anyone's device to capture their data."
Apple has five days to formally respond to the court order.
"Tim Cook is in a jam here. Who wants to aid and abet terrorism, which I'm sure is going to be the government's argument, but he's talking about a completely different right, which he's guaranteed to people. What's he going to do? Fold? I think he's going to take this to a federal court," Cramer said.
Shares of Apple traded slightly higher in early Wednesday trade.
— Reuters contributed to this report.
Disclosure: Cramer's trust owned Apple stock when this article was published.