Sometimes to save a ship from imminent danger a part of the cargo has to be thrown away into the sea in order to save the ship from imminent danger or prevent sinking of the vessel. In such grave urgency there is no time to determine whose cargo is precisely going to be sacrificed. In order to meet such challenges, the standing solution is that all merchants with their cargoes on board of the vessel must share the loss proportionately.
In this background, the law of general average is an accepted principle of admiralty law according to which parties to a sea voyage proportionately bear any losses due to voluntary sacrifice of a portion of the cargo or a part of the ship in order to save the whole from complete destruction in a crisis.
(More http://www.britannica.com/eb/topic-228359/general-average-clause)