It is satisfying and certainly trendy to complain about America's allies. President Barack Obama unloaded on them recently in an interview with the Atlantic's Jeffrey Goldberg, calling them "free riders" who rely on the US for security but refuse to pay back. The commentariat has piled on, with a special focus on deteriorating relations with such perennial malcontents as Saudi Arabia, Egypt, and Turkey.

The truth is that our allies behave the way they do because we let them. We provide billions of dollars in military and other aid to countries in order to protect and advance US interests, yet we fail to use this leverage to induce the recipients of this aid to behave in a way that actually advances US interests.

That's because the US has become so focused on maintaining its relationships with its allies above all else that it's forgotten what the relationships were for in the first place: securing US interests.

In part, this is a holdover from the days of the Cold War, when what mattered was who was on "our side" and who was on the "their side" in the great ideological struggle with the Soviet Union. In other words, it was the alliance relationship itself that mattered more than anything. What our friends did on their own time in their own countries and regions didn't really matter, as long as they stayed our friends.

But that's not the world we live in today. In today's complex world, where most nations pursue cooperative and conflicting policies across different issues, the US should focus less on making our allies happy and more on making them actually behave like allies.

Allies behaving badly

President Obama is hardly the first president to complain about US allies. Indeed, there is a long history of US allies and client states accepting billions of dollars in American military and economic largesse only to pursue policies against US interests or carp about American unreliability. In 1996, then-President Bill Clinton had his first meeting with Israeli Prime Minister Benjamin Netanyahu. After the meeting, in which the leader of one of America's most pampered allies had lectured Clinton at length, Clinton reportedly fumed, "Who the fuck does he think he is? Who's the fucking superpower here?"

Pakistan is perhaps the most egregious example of an ally behaving badly. As Lawrence Wright has documented, despite (and arguably because of) the billions of dollars the United States has invested in its relationship with Pakistan since 1954, its government (or, more precisely, its military) has diverted US military assistance to build nuclear weapons; harbored Islamic militant groups that kill American soldiers in Afghanistan; sheltered the Taliban and al-Qaeda sympathizers (and probably Osama bin Laden); and gave succor to the AQ Khan network, which became a WMD Walmart for countries like North Korea, Libya, and Iran that were shopping around for equipment and expertise on how to build nuclear weapons.

Egypt is another case: The US has given Egypt billions of dollars in military assistance since 1979, avowedly for the purposes of maintaining Israeli-Egyptian peace, which Egypt manifestly has no interest or intention in breaking. But beyond that, the theory is that by maintaining links with the Egyptian military elite, the US would be in a position create in the Egyptian officer corps a pro-Western force for democratization.

The US should focus less on making our allies happy and more on making them actually behave like allies

Alas, 35 years into that experiment, in July 2013, the Egyptian officer corps overthrew the democratically elected Egyptian government and has since brutally suppressed all opposition to their rule. A US-trained former Army general is now Egypt's dictator, but he shows little special inclination toward democracy or Western interests.

Saudi Arabia is yet another example. The Saudi regime is totally dependent on US military, logistics, training, and intelligence support. The Kingdom has no strategic alternative to US protection, and its leaders know it. Yet Saudi frequently acts against US interests in the region: trying to stop the Iran nuclear deal, funding Islamic extremist causes across the region, and undermining US efforts to negotiate an end to the war in Syria.

So why do successive administrations continue to provide massive handouts to America’s clients when we often get little — and sometimes worse — in return?

Domestic lobbies and the influence of powerful constituents like the US defense industry no doubt play a role in inhibiting the United States from holding allies and clients to account for behavior that is inimical to US interests. This is especially the case with countries like Saudi Arabia and Egypt that procure billions of dollars worth of sophisticated US weapons.

But these defense industrial interests don’t explain why even American allies like Turkey that don’t buy much weaponry get away with these behaviors. And they don’t explain why even those US agencies like the State Department that have little to do with the defense industry consistently advocate for allied interests.

Cold War legacy: either "with us" or "against us"

The better answer is that the Cold War created pathologies that have become deeply embedded in America’s foreign policymaking machinery, and particularly the priority it places on "alliance management."

During the Cold War, the US conveniently divided the world into those countries who were "with us" or "against us" in the global contest for ideological, military, and geopolitical supremacy between the US and the Soviet Union. The US had a diplomatic playbook for dealing with countries in both categories: reward and buy off your allies and clients in return for their solidarity and support in the fight against communism; contain, punish, isolate, and pressure your enemies for supporting the Soviet Union.

When it came to relations with our allies, what really mattered was that they stood with us in the broader conflict — everything else was easily forgiven or not even noticed in the name of maintaining the alliance. Overall, this philosophy helped maintain an effective anti-Soviet front, even when US allies committed all manner of sins. As was often said about US support for brutal dictators during the Cold War, "he may be a son of a bitch, but he’s our son of a bitch."

Today, most countries in the world are neither enemies nor vassals of the United States. The US works with Saudi Arabia to maintain stability in the oil market, for example, but winces at its role as "the chief ideological sponsor of Islamist culture." Egypt supports US efforts to broker a peace deal between Israel and Palestine, but prosecutes US-funded NGO workers, including the son of the US secretary of transportation, for trying to promote democracy in Egypt. Qatar hosts an American air base that is critical in the fight against ISIS, but actively undermines US policy in Libya and Syria, contributing to the chaos in those countries that allows ISIS to thrive.

These relationships are rife with both cooperation and conflict for the simple reason that some US and partner interests are compatible while others clash. Without the Cold War to provide discipline and context for allied deviations, such clashes come to define the relationship. Many of America's most important foreign relationships fall into this category, but Washington still behaves as if the alliance relationship itself is the most important factor.

How this enables bad behavior by our allies

Reverse Leverage: Many US allies are highly dependent on US support — military, economic, diplomatic, and intelligence — and they should be bending over backward to maintain that support. Yet it is more often Washington that performs the awkward gymnastics, bending over backward to keep relations smooth and assistance flowing.

Qatar, for example, is a tiny country full of natural resources surrounded by neighbors that loathe its government. It is fully dependent on the US for its protection. Yet US officials are afraid to call out Qatar for its actions in Syria and Libya lest the United States lose its military base.

So, rather than leveraging Qatar's dependence on the US for its entire survival to induce Qatar to stop acting against US interests in Syria and Libya, the US allows Qatar to leverage the US need for a military base in the region to induce the US to shut up and let it do whatever it wants.

Moral Hazard: In the diplomatic version of helicopter parenting, the US protects its client states from suffering the full consequences of their behavior by bailing them out of trouble, incurring the costs and adverse consequences rather than making their putative ally bear the consequences of their actions.

The result is a classic case of "moral hazard." For example, when Saudi Arabia intervened militarily in Yemen against US advice, the US response was nonetheless to support the intervention, specifically to ensure that Saudi Arabia would not feel the full consequences of failure. Naturally, the lesson that the Saudis learned is that the United States will back them back no matter what they do.

It is more often Washington that performs the awkward gymnastics, bending over backward to keep relations smooth and assistance flowing

And in Yemen, this unconditional support has adversely affected important US interests: The increased violence and chaos caused by Saudi military intervention has empowered al-Qaeda in the Arabian Peninsula, which is based in Yemen and still considered by the US to be a dangerous threat to the US homeland. It has diverted Saudi assets from the campaign against ISIS, and it has escalated the conflict between the Saudis and Iran, which is having a destabilizing effect throughout the region.

Endless Reassurance: President Obama complained in the Atlantic interview that Saudi Arabia's competition with Iran is helping "to feed proxy wars and chaos" in the Middle East, yet he made a personal trip to Saudi Arabia just last week to reassure the Saudis of the US commitment to Saudi Arabia's security.

But why should the US care if Saudi Arabia feels like we're abandoning it?

Rather than trying to reassure the Saudis, the US should be leveraging Saudi fears of abandonment — along with the billions of dollars in arms the US sells Saudi Arabia — to compel it to curb its actions in the region that are feeding proxy wars and chaos.

It's not you, it's me

As one US administration official noted, "Our allies all give us headaches, except for Australia. You can always count on Australia." That’s great about Australia, but the overall pattern suggests it's time to start looking closer to home for the source of these problems. If you have one bad ally, you can blame the ally; if you have all bad allies (except Australia), maybe it's you.

Jeremy Shapiro is Research Director at the European Council on Foreign Relations. Richard Sokolsky is Senior Associate at the Carnegie Endowment for International Peace.