As mentioned, in Exodus 14 – i.e. the story of the passage in the Red Sea – there are two different stories that have been interwoven by the biblical authors. In the first, it is said that the passage in the Red Sea was due to a true division of water; in the second, the passage was due to a seawater drainage.
The first story consists of an order given by God in v. 16 and its execution in v. 21. In both verses there is also the order to walk on dry land and its fulfillment. Obviously, the description of the two walls of water – produced by the division of the sea – belongs to the same story.
The second order, to stretch out the hand and bring water back to the Egyptians, (v. 26) finds its execution in vv. 27 and 28. To the first story also belong these elements:
1. the hardening of the heart of Pharaoh (see verse 4.8.17)
Finally, even vv. 1-4 and 15-18 belong to this account, that is composed of these verses: 14,1-4,7-8,15-18 (part of the v.) 21. The only element that does not fit in this description is v. 15, because it is impossible to know when Moses cried out to the Lord. Apart from that, the story is coherent and is based primarily on the correspondence between the word of God and its fulfillment.
Therefore, the purpose of the tale is the manifestation of YHWH’s glory in the eyes of the Egyptians, its superiority over the Egyptian gods. In this context, humans – whether Jews or Egyptians – are in the background of the clash of divinity to manifest their superiority. It is evident that, for the author YHWH was the only Almighty God and superior to all the gods of other peoples.