Upvote:8
Egypt did not recognise Israel as a country until 1979. Till then, it effectively considered Israel to be enemy-occupied Palestine. (A number of Muslim-majority countries still do.) Consequently, it did not deem Israeli shipping to be legitimate and therefore contended that the blockade did not contravene any agreements.
Israeli shipping in the Suez had been blocked by Egypt on and off ever since the partition. King Farouk pointedly ignored a UN resolution ordering the reopening of the canal in the 1951.
Egypt blocked shipping in both the Suez and the Straits of Tiran during the Six-day war as well.