The central objective of increasing the security and military costs imposed on Iran is not necessarily to launch an all-out war, but rather to compel the Iranian leadership to accept a new deal.
These costly U.S. attacks failed to achieve their goals, but were conducted in order to inflict a blow against Yemen, for daring to challenge the Israelis.