"That was a bridge we thought we shouldn't cross that was not good for America, and so we stood up … I think when you are approached like this you have to stand up for what you believe in," Cook said.

In an interview with CNBC's Jim Cramer on Tuesday, Cook stated that Apple has always worked with law enforcement. As long as a valid warrant was presented, the company would provide any information that it had. What made the San Bernardino request different was that Apple was asked to create a product that did not exist. Cook believes that this could have put millions of people at risk.

That intention came under fire earlier this year when Cook refused to assist the FBI with unlocking an iPhone used by one of the two attackers that resulted in the death of 14 people in San Bernardino, California, in December.

"We produce products that give the people ability to do things that they couldn't do before. And in doing so, we helped change things," Cook said. (Tweet This)

In Apple CEO Tim Cook 's perspective, his company has always stood for being able to build the best products on Earth to enrich people's lives.

I think government in general has gotten quite dysfunctional in the U.S. and in some other countries as well.

As a result of Apple's opposition to override the iPhone encryption features, the U.S. government decided to sue. Cook remains proud that his company conducts business in a way that he considers to be right and just.

He cited such examples as Apple caring deeply about the environment, how it makes it products, the use of renewable energy and taking a stand for people's right to privacy.

"I think government in general has gotten quite dysfunctional in the U.S. and in some other countries as well," Cook said.

Read more from Mad Money with Jim Cramer

Cramer Remix: What history's taught us about Apple

Tim Cook: The most important thing for Apple long term

Cramer: Tim Cook cops to a conference call error

The dysfunction, Cook says, has resulted in putting more responsibility on the everyday citizen and companies to help promote change in society. He believes that it is everyone's responsibility to change the environment, not just the government.

When the "Mad Money" host asked what Cook is most proud of at Apple, he pointed to products that give customers the ability to do things they couldn't have done before.

Cook said what lights him up the most is the possibility of a grandmother using Apple's FaceTime feature to connect with her grandchildren across the globe, or reports of autistic children finding a new voice through the use of his technology.

"All of these things excite me because they are bringing out the best in people. And we are about empowering people," Cook said.

Ultimately, Cook says the iPhone encryption issue should not belong in court. His team always thought it belonged in a discussion between various groups that include intelligence, law enforcement, civil liberties and technology. He hopes that the issue in court will not happen again.

Cook says he deeply admires people who fight for human rights and push humanity forward.

"I had incredible love and respect for Steve [Jobs]. I think there has never been anyone like him and believe his contributions and gifts to the world were unbelievable," Cook said.

He also said he admires both Robert "Bobby" Kennedy and Dr. Martin Luther King Jr. for risking everything, including their lives, to push people towards inclusiveness.

"They were all about inclusiveness and I am a great believer in inclusiveness. I have always respected them and believed that we need more people in the world with that kind of view," Cook said.