Probably just because it's much much simpler. How do you objectively compare the delivery difficulty of 100 lbs of potatoes vs a diamond ring? Should the delivery cost of 100 lbs of diamond rings be the same as 100 lbs of potatoes? What about 100, 1-lb boxes vs 1, 100 lb box? Size also makes a difference. You could charge per item, based on weight, like postal shipments. But then you also need to have accurate weights and dimensions. And transporting two boxes to the same address isn't twice as difficult as shipping one box. These aren't insurmountable problems, but as long as most people aren't complaining, there's little pressure to change.
edit: changed shipping to delivery, to avoid confusion.