What does density of a ship's cargo have to do with the volume of the cargo the ship can carry?

The Cargo must weigh less than the ship, and although heavy, ships are less dense than water.