We probably inherited our joints from… a fish
Cartilaginous fish form the same style of joint that we do, while jawless fish don't.

What do we have in common with fish, besides being vertebrates? The types of joints we (and most vertebrates) share most likely originated from the same common ancestor. But it’s not a feature that we share with all vertebrates.
Humans, other land vertebrates, and jawed fish have synovial joints. The lubricated cavity within these joints makes them more mobile and stable because it allows for bones or cartilage to slide against each other without friction, which facilitates movement.
The origin of these joints was uncertain. Now, biologist Neelima Sharma of the University of Chicago and her colleagues have taken a look at which fish form this type of joint. Synovial joints are known to be present in jawed but not jawless fish. This left the question of whether they are just a feature of bony skeletons in general or if they are also found in fish with cartilaginous skeletons, such as sharks and skates (there are no land animals with cartilaginous skeletons).