In a direct conflict, no one is going to sit back and be destroyed by drone swarms: they'll bomb the industrial districts.
In war, the enemy gets a say in your plans: Iran can't beat the US directly, but it can hit energy infrastructure around the Gulf which is politically untenable for the US.
But it works the other way too: if your enemies plan is "you won't bomb the big industrial facilities so we'll just win" then you break out the fancy expensive missiles and bomb the industrial facilities. Or the power plants.