CNN national security analyst John Kirby is a retired rear admiral in the US Navy who was a spokesman for both the State and Defense departments in the Obama administration. The views expressed in this commentary are his own.

(CNN) The United States took a shellacking today at the United Nations, when 128 countries voted to denounce President Donald Trump's decision to recognize Jerusalem as the capital of Israel.

But, in truth, not much is going to change as a result of this vote. The Trump administration will stand by its decision. They'll continue plans to move our embassy to Jerusalem. The moribund peace process will stay moribund. And, despite all Trump's threats, the United States will not cut off aid and assistance to every nation that voted against us.

That's because he knows -- or at least the more measured people working around him know -- that our aid and assistance packages serve our national interests. Even the State Department spokesperson walked it back a little, reminding the press that Thursday's vote is "not the only factor the administration would take into consideration in dealing with our foreign relations."

Foreign aid and assistance is not charity. It's vital to our security and to the security of our allies and partners. We contribute to the economic growth, development, security and humanitarian needs of numerous countries, and that helps ensure those countries' problems don't blow up into larger, longer stability problems in the region -- which we may then need to expend more blood and treasure to address.

Even Trump's much-touted national security strategy acknowledges, we "aid others judiciously, aligning our means to our objectives, but with a firm belief that we can improve the lives of others while establishing conditions for a more secure and prosperous world."

Altruism, too, plays a role. Americans are a generous people, kind and selfless. And very often, we help other people simply because it's the right thing to do -- such as in the wake of natural disasters or in the event of pandemic illness, famine or civil war. Even then, there is a tangential benefit to America's global reputation and to our influence.

That said, it would be wrong to conclude that Thursday's vote didn't matter.

It mattered to the vast majority of nations who saw it as an opportunity not only to rebuke Trump, but also to remind themselves and their people of longstanding commitments they made to support UN resolutions about the nature of the Israeli-Palestinian conflict, about the importance of seeking a two-state solution, and about the need to preserve the final status of Jerusalem as an outcome of negotiations between the two sides -- rather than as some sort of fait accompli by one or another member states.

It mattered because it shows us all just how difficult it's going to be in the wake of Trump's Jerusalem declaration to get those negotiations back on track. We must face the reality that, however distant it already was, a two-state solution is even more out of reach now.

And it mattered because the vote further isolates and embarrasses the United States. Complaining about NATO spending. Pulling out of the Paris Accord. Abandoning the Trans-Pacific Partnership. Attempting to decertify the Iran deal. Now this. Under President Trump, the United States is increasingly alone, not first, among nations. And his harping, whining and bullying only make us look petty and small.

So much for " principled realism " the Trump administration claims defines its national security strategy.

There was nothing principled or realistic about what Trump and UN Ambassador Nikki Haley tried to do this week. But then, I think they knew they were asking for it. They knew the scrutiny they were going to receive. And I think they like playing the victim. I think they believe victimhood lends credence to their anger and sense of entitlement. It makes it easier for them to play to a base of voters who believe international cooperation and compromise are weaknesses.

"When a nation is singled out for attack in this organization," said Haley in her speech to the UN on Thursday, "that nation is disrespected. What's more, that nation is asked to pay for the privilege of being disrespected. In the case of the US, we are asked to pay more than anyone else for that dubious privilege."

Haley should remember that privilege comes with responsibility, that respect must be earned -- even nurtured -- and that the United Nations isn't one of Trump's country clubs. It's a deliberative body of sovereign states who have just as much right to express their will as we do. Compromise and accommodation come with the territory.

Follow CNN Opinion Join us on Twitter and Facebook

She should remember, too, that the only nation who singled the United States out for "attack" today was the United States itself, when Trump decided making good on a campaign pledge was more important than making good on a commitment to peace in the Middle East.

Our power, great as it is, doesn't give us the right to dictate or to bully. It doesn't preside in our military or our economic might alone. It comes from the example we set. And today, we set another horrible example.

Trump likes the Rolling Stones song, "You Can't Always Get What You Want." Well, sometimes, like Thursday, you get exactly what you deserve.