San Francisco (CNN Business) Jeff Bezos says his companies will continue to do business with the US Department of Defense, despite internal and external criticism.

"If big tech companies are going to turn their back on the DoD, this country is going to be in trouble," said Bezos on stage at the Wired25 conference in San Francisco on Monday.

The billionaire has faced backlash from Amazon ( AMZN ) employees over its business deals with government agencies. It has already worked with the DoD and multiple law enforcement agencies have used its facial recognition system -- Rekognition. Amazon employees and civil liberties organizations claimed that the software could be used violate human rights.

"We are going to continue to support the DoD, and I think we should," said Bezos. "One of the jobs of senior leadership is to make the right decision, even when it's unpopular."

Now Amazon is vying for a $10 billion contract with the Department of Defense to consolidate and host its data on the cloud.

Other tech giants have responded differently to internal protests. Google is no longer competing for the $10 billion contract, and it decided not to renew an AI contract with the Pentagon after employees signed a petition.

Bezos, however, is sticking to his plans.

The owner of the Washington Post newspaper, Bezos has been a subject of critical tweets by President Trump. His tensions with the current administration hasn't changed Bezos' view of the United States, however.

"I like this country," said Bezos. "I know everyone is conflicted about the current politics in this country — this country is a gem. It is amazing, it's still the best place in the world, it's the place people want to come, there aren't other countries where everybody's trying to get in. I'd let them in if it were up to me. I like them. I want all of them in. This is a great country and it does need to be defended."

Amazon isn't the only company doing business with the government. Last week, Bezos' space travel company Blue Origin secured a $500 million contract with the federal government to work on a launching system.

He did say some technologies could be misused, but that it is not a reason to stop their development. He compared current technology to the invention of books, which have been used for good and bad, including creating "fascist empires."

"The last thing we'd ever want to do is stop the progress of new technologies," said Bezos.

Eventually, society will develop an "immune response" to bad uses of technology, according to Bezos.

"I think social media is increasing -- unfortunately -- identity politics, tribalism. I think the internet in its current incarnation is a confirmation bias machine," said Bezos. "I worry that some of these technologies will be very useful for autocratic regimes to enforce their role ... But that's not new, that's always been the case. And we will figure it out."

He went on to defend scrutiny of large companies like Amazon, as well as other large institutions such as governments and big non-profits.

"I preach inside Amazon, this is going to happen, it's normal, don't take it personally," he said. "You want to live in a society where that happens."