This attack was a message to NATO. The US is not the only navy with cruise missiles that can hit any point in the ME.
Or maybe they just had a bunch of missiles with their shelf life ending that needed to be shot? Doesn’t really make sense as if they were really targeting ISIS, then why not fly a sortie instead of shooting a missile from 1000 miles?