The current thinking is that the proto-amphibians adapted fins into limbs because it enabled them to wriggle through dense aquatic vegetation more easily. That the limbs enabled them to move clumsily about on land was fortuitous.
And we still have "walking catfish" moving about on land. Walking catfish .