There was a massive river that ran through there. Mars does not have tectonic plates - or if it does, they are not and likely have never been mobile like the Earth's. Although to be honest, that 'never been' is highly debatable as we don't have enough information to definitively prove that.
Anyways, the fact that there aren't plates moving around meant that stuff like this and Olympus Mons (one of the biggest volcanoes in the solar system) got absolutely huge because they didn't move around and get disrupted in their formation. In the case of the valley, that river ran through there likely for a billion years or something crazy. Same for the volcano which sat over the exact same hotspot without moving for similar timescales. The Hawaiian islands are a good example of how tectonic forces break up things like giant volcanoes. That island chain is a long arc of extinct volcanoes that moved off the hotspot, stopped growing and started eroding. Olympus Mons sat there feeding on magma until the magma dried up.
Edit: While there was a river there, see following post for more accurate information.