As the Monterey Bay Aquarium Research Institute (MBARI) explained:
This sea pig (Scotoplanes sp.) was spotted at 1,290 meters (4,230 feet) beneath the sea surface with a juvenile king crab (Neolithodes diomedeae) clinging to its body. Researchers speculate that this may help young crabs evade predators.
[…]
One of the most puzzling [mysteries about sea cucumbers] remains why they sometimes give rides to "hitchhiking" juvenile king crabs, without any clear benefit to the sea pigs.