Though they would never say so out loud, on some level Prime Minister Justin Trudeau and Foreign Affairs Minister Chrystia Freeland must regard Saudi Arabia’s imposition of sanctions and punishments on Canada as a gift.

The Saudi attack, despite being a time-consuming annoyance at an inconvenient moment, allows them to do something that no Canadian government could have done on its own: distance this country from an overly friendly relationship with a regime whose conduct, interests and regional influence are contradictory to democratic values.

Saudi Arabia was a visible stain on the Liberals’ supposedly principled, feminist, rights-promoting foreign policy. There was no way you could call it any of those things as long as one of its most visible planks was a cozy economic, political and military relationship – which included authorizing the sale of 928 Canadian-made armoured vehicles – with a regime that is imprisoning and flogging feminists, using those armoured vehicles to commit mass atrocities in Yemen and to attack Saudi citizens in the country’s east. The “moderate Islam” policies promised by Crown Prince Mohammed bin Salman have proved almost entirely illusory (just this week, the Kingdom beheaded and crucified a man convicted of murder) and Riyadh’s value as an opponent of Bashar al-Assad’s rule in Syria is questionable.

Story continues below advertisement

But that relationship could only have been terminated by the Saudis. Any Canadian politician considering such a move would be faced with a stark calculus. The political cost – from businesses and universities and key constituencies that benefit from Saudi ties – would outweigh any immediate benefit.

Most of what we call “foreign policy” is not about governments expressing their principles and values, or politicians keeping promises. Rather, it is about path dependency. Government bureaucracies try to keep doing what they’ve done before because change is far more difficult and risky than continuity.

Any minister looking to distance Ottawa from Riyadh would confront a list of major departments with bureaucracies that have entrenched Saudi relationships.

The government’s industry department (Innovation, Science and Economic Development Canada) as well as the globalization agency Export Development Canada have spent years shuttling back and forth to Riyadh, shepherding contracts with Canadian giants such as SNC-Lavalin Group Inc. and Barrick Gold Corp. The most significant might be London, Ont.-based General Dynamics Land Systems, whose $15-billion deal for armoured vehicles represents the largest piece of Canada’s Saudi trade and a major source of work for its 2,000 Ontario employees.

The Department of National Defence and Canada’s intelligence agencies have security and counterterrorism engagements with the Kingdom, both formal and informal, often as part of relations with NATO and the United States.

And Ms. Freeland’s department, Global Affairs Canada, is tied up with Saudi Arabia in a range of regional diplomatic, governance, aid and educational programs – including the consular work involved in bringing 15,000 Saudi university students to Canada each year.

Not only that, but a big part of the work done these days by her department, including most of its 180 embassies, involves wrangling and horse-trading intended to get enough votes among United Nations members to win Canada a rotating seat on the UN Security Council. Everyone remembers that Stephen Harper’s Conservative government failed in its bid for a Security Council seat partly because it didn’t have the support of the influential “Sunni bloc” of Arab states (in that case, because of Mr. Harper’s lopsided Israel-Palestinian policy). Without a Saudi thumbs-up, Canada could well lose out again.

Story continues below advertisement

None of this, by itself, is very important to this country. A Security Council seat holds mainly symbolic value – that is, failing to get one makes us look weak – and isn’t worth the sacrifice of time, energy and political equity it entails. None of the business deals, even the armoured vehicles, are of crucial importance to any Canadian sector or to the overall economy; to put it in context, we have twice as much trade with Brazil. And Saudi Arabia’s strategic significance was always mainly about our relations with the United States, which aren’t what they used to be. But taken together, they represented a huge headache for any government wanting to change things.

A Saudi-led withdrawal inverts the equation: By being punished by the Saudis for failing to adhere to its tyrannical, theocratic values – which can’t be defended, in good faith, by any Canadian party – the Liberals now have good reason to place our higher political values above the country’s lesser, material ambitions. They no longer have anything to lose.