The story of Jesus walking on water was given a significant place in the oral tradition of the early church. It was integrally linked to the feeding of the 5,000, and when finally the oral tradition was documented, all four gospels recorded the two stories together.
Literary evidence exists showing that the ancients were quite interested in the ability of the gods to exercise control over nature and its elements. The miracle, at this level, evidences divine authentication . The account also reveals Christ's mastery over the sea, not just water, but the sea as chaos. For the Jews the sea was a dark and forboding place, not just because of its many dangers, but because it was the dwelling place of dark powers, of Leviathan. The stilling of the sea is therefore not only christological in orientation, but also eschatological; Jesus is even now stilling the deep. Matthew's addition of the Peter incident focuses attention on Jesus' saving power.
The gospel tradition was shaped by oral transmission such that the stories developed their own particular shape in different geographical regions and churches. When it came time to write these stores down (prompted by the increasing age and death of the apostles) the gospel writers selected, shaped and edited the tradition to enhance their own particular theological agenda.
Although there are differences between Matthew and Mark's accounts of Jesus' walking on water, the theological perspective is much the same. Both reveal divine authentication, both image Jesus' preemptive struggle and victory over the powers of darkness, and both reveal the fulfilment of Israel's messianic hope in the prophet like unto Moses - when even the wind and the waves obey him.
Ultimately the story is about having faith when the going gets tough. Fix on something beyond the immediate and you will ride the storm and be at peace.