There is a general agreement in the system that Iran can make trouble for the West in Iraq and Palestine and that by doing so it will force the Americans to take it seriously and give it a security role in the region.

He is pursuing it (the anti-Israel line) because he doesn't really have any choice internally. Otherwise he will be sidelined. It's very hard, even for people like Rafsanjani, to adopt a more moderate stance.

Probably, they anticipate that down the line there will be a point that confrontation will be inevitable. Therefore, they are just indicating that in case they come under any military pressure or any threat then they can properly defend themselves.

This sort of military propaganda will definitely give them (those seeking tougher action) more ammunition to level more accusations against Iran that Iran is under a military minded government and leadership.