The keyword here is peaceful use of the sea and it extend the definition of innocent passage to the EEZ .AND THE WORD"DUE REGARD TO COASTAL STATE " COLLECTING INFORMATION OF THE COASTAL STATE IS NOT A PEACEFUL ACT. Read this from convention of sea article 19
2. T
hese freedoms shall be exercised by all States with due regard for the interests of other States in their exercise of the freedom of the high seas, and also with due regard for the rights under this Convention with respect to activities in the Area
Security Jurisdiction under the Law of the Sea Convention
The Law of the Sea Convention does not deal with security issues to a significant extent. It almost completely avoids consideration of the law of naval warfare, and references to security matters are not dealt with in a single location, in the context of other matters.
Such references as there are can be found concentrated in the context of the regime of innocent passage, where the coastal State may temporarily suspend innocent passage for the purposes of essential security protection[1], and where different activities are deemed “to be prejudicial to the peace, good order or security of the coastal State” if they occur on board a foreign ship in the territorial sea of the coastal State.[2]
Article 19 of the Law of the Sea Convention indicates the activities of a vessel that are considered inconsistent with a right of innocent passage:
1. Passage is innocent so long as it is not prejudicial to the peace, good order or security of the coastal State. Such passage shall take place in conformity with this Convention and with other rules of international law.
2. Passage of a foreign ship shall be considered to be prejudicial to the peace, good order or security of the coastal State if in the territorial sea it engages in any of the following activities:
(a) any threat or use of force against the sovereignty, territorial integrity or political independence of the coastal State, or in any other manner in violation of the principles of international law embodied in the Charter of the United Nations;
(b) any exercise or practice with weapons of any kind;
(c)
any act aimed at collecting information to the prejudice of the defence or security of the coastal State;
(d) any act of propaganda aimed at affecting the defence or security of the coastal State;
(e) the launching, landing or taking on board of any aircraft;
(f) the launching, landing or taking on board of any military device;
(g) the loading or unloading of any commodity, currency or person contrary to the customs, fiscal, immigration or sanitary laws and regulations of the coastal State;
(h) any act of wilful and serious pollution contrary to this Convention;
(i) any fishing activities;
(j) the carrying out of research or survey activities;
(k) any act aimed at interfering with any systems of communication or any other facilities or installations of the coastal State;
[1] Article 25(3) of the Law of the Sea Convention provides:
The coastal State may, without discrimination in form or in fact among foreign ships, suspend temporarily in specified areas of its territorial sea the innocent passage of foreign ships if such suspension is essential for the protection of its security, including weapons exercises. Such suspension shall take effect only after having been duly published.
A provision with similar effect extends the same right to an archipelagic State in respect of archipelagic waters where innocent passage may be exercised. See Article 52(2), Law of the Sea Convention.
[2] Article 19, Law of the Sea Convention