LONDON — When President Trump left the NATO gathering early and in a huff on Wednesday, it only reinforced the fear that with America distracted and retreating, the West’s celebrated alliance has lost focus.

The 70th anniversary celebrations in London largely illuminated NATO’s uncertainty about whether its primary mission is defending against a disruptive Russia, a threatening Iran, a rising China, or reconfiguring its strategy to deal with an array of new cyber and disinformation threats that it has been slow to confront.

And NATO’s own internal divisions were on vivid display, from Turkey’s disruptive role to the question of whether Europe needs its own defense — independent of the United States — alongside or in competition with NATO.

Mr. Trump, as he often does, focused more on warning member countries that while they have spent $130 billion since 2016, they must do more to share the burden. Whenever he alluded to strategy, it was usually to deflect the focus from containing or confronting Russia.