A few functions of building a pretext for war with Iran:
— Greater arms and defence technology sales to Saudi Arabia and the UAE, with little or no scrutiny or criticism
— Diversion of scrutiny and criticism of Saudi Arabia and UAE with regard to the Yemen war, as well as domestic human rights abuses
— Rise in oil prices
— Economic pressure on China due to higher oil prices
— Bonus for UAE selling higher priced oil to China, as UAE can export without using the Straits of Hormuz; this also increases the power of UAE vis-a-vis Saudi Arabia, which could ship oil from UAE’s port to bypass the Straits
— Justification for increased US military presence in the Gulf