Answer:
because of the fear of an alliance among the Shia Muslims in Iran and Iraq.
Step-by-step explanation:
Though, the Shatt al-Arab was important, it was not the only reason for Iraq's attack on Iran. In Iran, majority of the Muslim population belonged to the Shia sect. While in Iran, though Shia sect was also present proportionately in a large number, the Sunni sect led by Saddam Hussein was the most powerful ethnic group.
The fact that the Shia sects from both Iran and Iraq belonging to the same brethren became a potential threat to Hussain. He feared that if Shia Muslims from both Iran and Iraq joined forces, it would threaten his power. Therefore, he attacked Iran in order to destroy any potential threat to his power.