Syria never fired a single bullet towards Israel, but it still got its entire infrastructure as a country, its entire military, and state institutions bombed to absolute destruction.
That is the ruleset that America, and Israel play by. ie there are no rules. When you are dealing with such people, you have to do deal with them on equal terms and impose a cost.
For Iran, to take out an aircraft carrier or two, will be something because regardless of what Iran does, be it a small response or all out, the cost to Iran will be identical. So, if you are going to go down, you might as well go down swinging.