Ned, If I had to guess, I'd think that it was always considered, and probably wargamed as enemy branch plan or sequel to some blue force action. Surely some red force commander took that action along the way either on an ad-hoc basis or as a scripted action to pull the thread on that potential enemy COA.
However (and i'm not telling you anything you don't know), that doesnt mean that it was considered a likely enemy COA by the staff currently in the fight.
Attacking neighbors makes sense as a high-risk , maybe even last-ditch, attempt to escalate in order to get the US to back off on it's own OR with pressure from the gulf countries getting attacked making unhappy faces and grumbling and alluding to restricting use of bases on their soil.
They (Iran) started hitting out randomly pretty early. Given that, the other way it makes sense is that the violence and success of the initial decapitation strikes, followed up relentlessly by attacks on C2 infrastructure, left lower level commanders operating on pre-established "doomsday"-type orders.
I am of the opinion that, these actions are not helping Iran, and indeed, having the opposite effect is due to groundwork laid by Trump 1.0 and reinforced by his tour of the gulf states early in 2.0. Nobody loves a winner and respects power more than that part of the world. EVERYONE knows the power of the US. What is always in question, however, is the WILL of the US. I think that the reason that the attacks from Iran are having the opposite effect is down to Trump. They all want Iran neutered and they are hitching their wagon to Trump as a strong leader. When this is over, if this turns out right, there is a real chance of a reshaped middle east.