The U.S. was in a hot war as well.
The shootdown of Iran Air 655 occurred during Operation Earnest Will, which involved the convoying of Kuwaiti (not Iraqi) oil tankers through the Persian Gulf to protect them from Iranian interdiction contrary to the UN Convention of the Law of the Sea regarding international waters and navigation rights.
Throughout this operation, Iran conducted mining efforts within the Persian Gulf. On the very first convoy an oil tanker was hit by an Iranian mine (luckily causing no injuries or loss of life). Later in the convoy operation U.S. special operating forces managed to capture an Iranian minelayer in the act of laying mines.
Later during this same operation, USS Samuel B. Roberts (FFG-58) was struck by an Iranian mine (proven based on serial numbers matching mines noted from the aforementioned spec-ops mission).
The mine caused damage which is normally fatal to warships of that size (the keel cracked and both engines were knocked from their mounts). She had to limp out of the minefield on auxiliary thrusters while the crew fought to contain damage and save the ship. 10 sailors were injured badly enough to require evacuation. 4 of those were badly burned and had to be sent all the way back to the U.S. to recuperate.
As a result of that, the U.S. Navy launched a short surface operation against Iranian platforms (Operation Praying Mantis) on April 18, 1988.
Meanwhile, about a year before Iran Air 655, on May 17, 1987, an Iraqi (U.S. ally??) Air Force jet had attacked the frigate USS Stark (FFG-31) with two Exocet missile in the Persian Gulf. Though the damage to the ship itself was not as severe, 37 sailors died and 21 more were injured.
In the context of all of that, on July 3, 1988, USS Vincennes shot down Iran Air 655. To be clear the ship captain was clearly in the wrong. Even with the 'fog of war' and the problems of having to use instruments to fight instead of one's own eyes he had enough indications to know he wasn't under attack.
But the shootdown itself didn't come out of thin air, and the U.S. was brought into a tense situation in the lead-up to the events of that day (though admittedly, they didn't do much to de-escalate either once it started happening).