I'm trying to design a species that is largely aquatic and yet capable of walking / running (loosely) on land. I've already figured out a gill and lung type respiratory system to allow them to breathe in both air and in water, but I'm stumped on why a mostly aquatic being would have legs (or things that serve a similar function)... or ARMS for that matter.
The species is based mostly on octopi and squid. My plan was to give them the same basic features (very large eyes, beak, tentacles) but for the sake of my story they need to be able to move on land. I've also been thinking of the concept of their "legs" and "arms" having joints that deliberately dislocate to create a type of fluidity in the water so that those limbs aren't completely useless underwater, but I'm not really educated anatomically and I'm not even sure if that would work.
Tldr: basically put, how do I give squid-like mostly aquatic aliens arms and legs while remaining truthful to science?
Edit: it's come to my attention that while octopi are very dexterous underwater they are rather clumsy on land and have a hard time lugging around their bodies. If I want to keep the general form of the octopi, how would I counteract this? Otherwise, I'm still searching for reasons and ideas on how to give them legs.