There is no set legal doctrine for who assumes the risk of goods that are lost, stolen, or damaged during shipping. In general, if the loss or damage is the fault of the shipper, the shipping company must make the loss good. However, much of the time the shipping company is not at fault. In that case, the risk is assigned by the contract between the two parties.
The buyer and seller may assign the risk however they like. Some contracts call for the seller to take the risk all the way to the buyer's door while others call for the buyer to take all the risk.
There are clear cut provisions in law based on the division between buyer and seller the risk of damage or loss of goods sold during transit or shipment. The bearer of risk actually depends on the terms of sale which determine the point of time and place when the property in goods is legally transferred from the seller to the buyer. Pleas note that the legal term "transfer of property in goods" is not same as physical transfer of the goods.
In laws relating to sale and purchase there is a provision for specifying the point of transfer of property in goods. This is done by means of terms like "Ex works" and "c.i.f. (cost of insurance and freight paid)". For international trade these terms defining responsibilities of buyers and sellers have been standardised and are called INCOTERMS.
Please note their that this sharing of the risk between buyer and seller does not exonerate any other parties involved in the shipment or the insurance companies. However the responsibility for recovery of damages from these other parties by buyer or seller is decided on the basis of the point of transfer of property in the goods.