I think Iran kinda made a wise choice in the sense that the more time goes on, the more advanced Iran gets in technology, in GDP, in industrial production. They have the population and the resources. Israel is done, its the most powerful it will ever be. This is their swan song.Iran definitely needed to drag this on for a month or two.
Doesn't matter if they launch one or two missile a day and only 1 in 10 hit something, but the amount of attritional economic and political damage would be hard to undo, since Israel is a hi-tech, wealthy, knowledge economy.
But they chose ceasefire after 12 days.
The world is moving towards convergance between the west and the east. Countries like Iran and Turkey are getting stronger and stronger. While the gap between them and Israel gets reduced. If the war happened 10 years ago, Iran will have even worse technology and missile arsenal than they do now.
If Iran can get another decade of development they will be much more stronger. While Israel is stagnant. US and the west is stagnant.
For Iran, more strategic patience is a good choice.