Religious extremism wants control of their followers and they cannot keep that control without an external threat. Usually it is just some vague reference to unbelievers or some unsubstantiated evil, but that won't support a military budget.
Iran's leadership depends on the existence of the West to provide the visible danger they claim to shield their followers from. As can be seen from the situation, they are also playing the Sunni Muslims vs the Shia Muslims. They just need something to rage against.