Well... there could be any number of reasons... do not forget at some point ALL life on earth started in the water.. and at some point life started to venture onto land and in the skies.
I will try to be coherent here..
The most obvious reasons for the evolution of a species is
Food, their regular diet could have been interrupted by huge the drastic ecological shift causing them to adapt and go elsewhere
Predators, Its no secret the bigger the water the bigger the things swimming in it... You take two goldfish put one in a small bowl and the other in a large tank, the one in the tank will get big while the one in the bowl remains small.. There could have been massive new predators that evolved under the water that drove them to evolve to avoid them... this is in my opinion the most likely scenario.
Climate change, their original home would no doubt have changed so either they adapt or leave they obviously left.
God factor.. the gods did it for godly reasons.
also if you look at them they seem to be half way evolved in Ocarina, they clearly are more fish but you can tell at some point they were more like fish... In Ocarina they are adapted to live on land and in sea, and they have what appears to be wing like fins on their arms.. maybe they are already heading towards their evolutionary destiny... Heck maybe they could already glide at that point.. it supports the predator theory those that could jump out of the water and glide in the air would escape and survive to pass on those genes strengthening that trait in the next generation and so on.