It's simple. If you classify all bridges and power plants as military infrastructure, then both statements ("Iran spends only on it's military" and "We will bomb a bridge for every ship attacked") are not contradictory statements.
I mean, it's a monstrous position to take, but that hasn't stopped the whitehouse the thousands of times before from taking monstrous positions.