The shipping lane inside Omani water might be two miles wide, but the Straight itself is more like 30-50 miles wide.
The port at Bandar Abbas is vital to Iran's Navy and their commerce. If they blockade other people's shipping, they won't be getting their's either. It is like strapping on a suicide vest.