Dinosaurs are like modern-day birds, crocodiles and lizards in that they inherited particular joints in their skulls from fish ball and socket joints, much like peoples hip joints that seem to lend themselves, but not always, to movement like in snakes, when you put a lot of force on things, theresa tradeoff between movement and stability. Birds and lizards have more movement but less stability.