Defense Secretary Jim Mattis had an interesting answer when asked why he agreed to serve under President Donald Trump, who has at times made major policy changes without even talking to him about it.

Trump's behavior has led some to quit advising his administration, like the various business leaders who left after the president's comments on the violence earlier this month in Charlottesville, Virginia. But that's not Mattis.

Kevin Baron, the executive editor of Defense One, asked Mattis on Thursday why he didn't quit and why he serves. Here's what he told him:

"You know, when a president of the United States asks you to do something — I don't think it's an old-fashioned school, I don't think it's old fashioned or anything. I don't care if it's a Republican or Democrat, we all have an obligation to serve. That's all there is to it. And so you serve."

The defense secretary knows plenty about service: He served as a Marine Corps officer for 41 years, ending his career in 2013 as a four-star general leading US Central Command. He retired and took on teaching roles at Stanford and Dartmouth until he was asked to serve once again by Trump earlier this year.

"First time I met with President Trump, we disagreed on three things in my first 40 minutes with him: on NATO, no torture, and on something else, and he hired me," Mattis said. "This is not a man who is immune to being persuaded if he thinks you've got an argument. Anyway, press on."

Throughout the 2016 campaign, Trump advocated reinstituting torture tactics against enemy combatants. But in his first meeting with Trump in November, the general was able to change his mind in under an hour.

"He said, 'I've never found it to be useful,'" Trump told The New York Times, describing Mattis' view of torturing terrorism suspects. Instead, Trump said, Mattis argued that it was better to build rapport and reward cooperation during interrogations, and added a quip: '"Give me a pack of cigarettes and a couple of beers, and I'll do better."'