CNN National Security Analyst John Kirby is a retired rear admiral in the US Navy who served as a spokesman for both the State and Defense departments in the Obama administration. The views expressed in this commentary are his own.

(CNN) In President Donald Trump's book "The Art of the Deal," he writes about how important it is to know one's market, to study hard. He wrote that he likes to gather as many disparate opinions and views about a potential real estate deal as he can before making any final decisions about how it will affect a given area or neighborhood.

So it was a bit surprising to hear him say in an interview Thursday night that he expects South Korea to reimburse the United States for the Terminal High-Altitude Area Defense (THAAD) system we will soon be deploying to Seongju, a system that Trump said costs about a billion dollars.

Seems to me that he hadn't done all his homework. I mean, the United States has already agreed to fund it.

But more broadly, he apparently doesn't understand the contours of our alliance with South Korea or the importance of allies themselves. You see, allies are friends. And friends are folks you count on -- and who count on you. At least that's the way it is supposed to work.

In this particular alliance -- one of the most important in the world -- the stakes could not be higher. President Trump said so himself in an interview with Reuters. As if we needed another reminder, Pyongyang fired off yet another missile just today.

And yet, here he was in that same interview -- and oh, by the way, virtually on the eve of an important national election in South Korea -- utterly and completely surprising his ally with an announcement on THAAD reimbursement.

JUST WATCHED THAAD system in South Korea almost operational Replay More Videos ... MUST WATCH THAAD system in South Korea almost operational 01:38

I'm betting many in his own national security team were taken aback as well.

And while I'm sure the far left in Korea, which is opposed to the THAAD deployment, found the Trump invoice a helpful little talking point to support their thesis that the United States cannot be trusted, the President also unnerved millions of mainstream South Koreans who fear that the United States is willing to cozy up to China, divvying up the Asia-Pacific region at the expense -- and without the say-so -- of the Republic of Korea.

Even the top foreign policy adviser to presidential frontrunner Moon Jae-in called the payback an "impossible option."

And Bonnie Glaser, an Asia expert at Washington's Center for Strategic and International Studies, told Reuters Trump's remarks could actually run counter to the President's stated desire to show real muscle in his approach.

"Trump's remarks ... will likely boost support for Moon, and if he wins, it will make it harder for the United States to sustain a hardline policy against North Korea. "

It's a strange way, indeed, to treat a friend who is staring down the barrel of a gun while hosting nearly 30,000 American troops on its soil.

And that brings up another thing Trump doesn't appear to understand: his own military. The THAAD deployment is just that, a deployment. And like every other military deployment, while we may need the use of certain domestic facilities and physical sites, it's still our stuff and using it is still our responsibility.

In this case, THAAD was about one thing and one thing only: shoring up the alliance's defensive capability on the peninsula in the wake of repeated provocations by the North.

President Obama said as much at the time of the agreement: "We've worked together to strengthen our alliance, and to ensure our readiness against any threat. Our missile defense cooperation -- THAAD -- is a purely defensive system to deter and defend against North Korean threats."

The United States accomplishes that with this system. The South Koreans accomplish it by giving us a place from which to operate it. That was the arrangement, and it's totally in keeping with the Status of Forces Agreement we signed with the Republic of Korea back in 1967.

It's not clear at all where the President got his $1 billion figure. That's about what the system costs us to buy, but operating costs are much lower. And since we aren't selling it to anyone, it doesn't make much sense to slap a price tag on it.

Plus there's the little matter of scarcity: there are fewer than 10 operational THAAD systems in the American arsenal. Commanders will tell you they need each and every one of them -- and more. Wherever you decide to deploy a system like THAAD, you are by default making a decision about somewhere else you won't be able to deploy one.

It's a zero-sum game for such a precious commodity. So while it makes perfect sense to put one in South Korea right now, we aren't exactly out hawking them out to all bidders.

THAAD is a complicated, technologically advanced system designed to shoot missiles out of the sky. And it belongs to the United States. We own it. We maintain it. We deploy it. Hopefully, we will never have to use it.

And make no mistake, THAAD is just as much -- if not more -- about protecting our own assets, resources and troops on the Korean peninsula as it is about helping protect those of our ROK allies. For the commander in chief to hold it out as some sort of insurance policy on which we wish to extract a premium is to ignore completely the role this system plays in protecting American lives as well.

Follow CNN Opinion Join us on Twitter and Facebook

Finally, I don't think the President fully understands the art of this particular deal. This deal is most decidedly not a zero-sum game. Everybody wins.

Our troops and their families are safer. Our South Korean allies are safer. Pyongyang's ability to hit the South with missiles is reduced. China gets the message loud and clear that we mean business about our interests on the peninsula. And our allies and partners -- there and around the world -- take comfort in the fact that the United States will continue to meet its security commitments.

President Trump's team should be commended for the thoughtful, deliberate and strategic approach they have taken to the problem of North Korea's provocations. Secretary of State Rex Tillerson was downright sober and succinct Friday at the United Nations, laying out in clear language how seriously the United States is taking the issue and how unafraid we are to lead the rest of the world in solving it, if need be.

In that vein, there is a powerful and important geostrategic purpose to the THAAD deployment, one that far outweighs any cost of putting it there. And the President does a disservice to his national security team -- not to mention our alliance -- when he speaks about something as miserly and mean as reimbursement.

This isn't some real estate deal. It's a nation-state deal, a national security deal. And in deals like this, trust -- not cash -- is the coin of the realm. Unfortunately, Mr. Trump just spent a fortune of that.