Shake, which comes ultimately from the Teutonic skakan, at one time during its life in our language had the meaning “move away from, travel, wander.”
From this sense it acquired the meaning of “take away without permission, steal.”
This, in turn, led to the coining of shakedown in the sense of extracting unwilling tribute, as may be practiced by those who exact “protection” payments from their inferiors.
A shakedown cruise of a new ship, on the other hand, comes from the more modern sense of shake, “tremble, quiver.”
When grain, for instance, is measured out, rather than weighed, full measure is not obtained until the grain is literally shaken down in the container, in order that all the voids are filled as tightly as possible.
In the case of the ship, the agitation due to the voyage fills the analogous function of bringing any faults to light.