I think the Iranians realized at the last moment that the US Navy means business and is not to be messed with. I think they got the wrong message from the British incident with the Cornwall and thought it would also apply to the US Navy. They guessed wrong.
IIRC, the iranians didn't actually engage British military vessels, other than a very small, unarmed craft. I believe that what the iranians kidnapped was a small, very lightly armed boarding party from a cargo ship.
Mark