Upvote:13
Your reading of how alliances work is a bit too on the nose.
Religious and political links are a major factor. But they definitely aren't the only one. The word 'technically' is misapplied here.
Another factor is common adversaries. Azerbaijan has a long running conflict with Armenia, as you know. Turkey has also had major conflicts with Armenia. This is a reason they are on the same side as the Azeris here.
Turkey historically has had major conflicts with the Arab countries and been aligned with the United States (though not any longer). Also aligned with USA and in conflict with Arab states: Israel.
Iran OTOH has been an opponent of the US since the late 70s. When the US has asked its allies, including Azerbaijan, to cease trading with Iran or seize its assets, they've generally complied. Iran correctly interprets that as detrimental to its interests.
Democracies fight with democracies. Communist states fight with communist states. And so on. It's not that unusual.
Upvote:15