You are looking at it from a consumer point of view, not as a business whose activities include shipping things from a warehouse at a price that you find reasonable.
Put yourself in the position of business owner. Is it realistic to stock a cardboard box for every conceivable shape, size and combination of items you sell? Would your customer be willing to pay for this curated service? Does the despatch cost (writ large, as a process, not just the face value of the stamp) scale with box volume? Do you weigh every item you send and calculate to the nearest penny the most appropriate postage method and cost? At what point does the labour to do this outweigh the cost of a standardised solution?
No. You have a small (rationalised) range of packaging that fits most of your orders. Based on your daily volume, you negotiate a fixed fee with your carrier for each box of that dimension, whether it is bulging at the seams or 99% air.
Rationalised packaging is also easier to handle automatically. The box would start as a flat pack. It can be automatically 'inflated', the warehouse person chucks in the items and then the lid closing, sealing and label pasting is totally automatic. At the end, it stacks on a pallet in a logical way.