Many different groups of fish have independently evolved locomotion by "walking" on modified pectoral fins. One of my favorite examples are the bamboo sharks, among which are some pretty recently described species: https://en.wikipedia.org/wiki/Hemiscyllium_halmahera
There’s the reward conferred by being able to get further into shallow areas and take advantage of the additional food options they might offer over and above what’s available in deeper water. Transition zones are abundant with life and thus food.