Trump’s rebuke of NATO allies stems from their reluctance to support American efforts to reopen the Strait of Hormuz.