Closure of the Strait of Hormuz is one of the most modeled events in military circles. There are probably thousands of military exercises on it, intelligence estimates, strategic papers and so on. Up until this war, it was unknown if Iran could keep the Strait closed against direct US military pressure. Well, now we know.
There doesn't appear to be a single serious person in the US military, intelligence community or policy support organizations who thought this was a good idea. It was purely political. The administration seems to have listened solely to and relied entirely upon Benjamin Netanyahu and Mossad. Israel has been trying to get this war with every president since Reagan [1] and they've all said "hell no". Until this one.
What's more interesting is that it's been clear what a disaster this almost immediately so we've had ~2 months where it was clear that the US has militarily lost and a negotiated settlement was the only outcome. This would mean the end of economic sanctions and, for anti-Iran hawks in the US and Israel, a spectacularly worse deal than the JCPOA that got torn up. Yet the administration seems more willing to let the world ban than split with Israel.
War is never a good idea, but Iran didn't care and they have been waging war for 40 years. Do you just let them perpetually build strength internally while funding terrorism externally? They have been spreading extremism and instability in the region for decades. They surrounded Israel with militants and attacked them.
We knew they could disrupt shipping through the strait, that is a large part of the purpose behind "drill baby drill", stopping Venezuela from invading Guyana where we have oil infrastructure, and increasing oil investment into Venezuela, along with reopening some oil drilling off California.
We also knew we likely couldn't justify the risks and costs of sending in a large invasion force for multiple reasons. If a decent deal couldn't be made, then at least you remove an oil supplier from China and you mow the grass to limit the threat Iran poses in the near future. Even if the strait remains in conflict for years, in the long-term that is a good thing, because it forces an acceleration of bypassing it as an issue which means Iran loses a big button to push in the future.
Meanwhile, with oil prices higher, that is historically good for oil investment which is excellent for Venezuela so more of the fuels that countries rely on come from our hemisphere. We're not new at this game.