This is especially annoying when you realize that ever brand is different. There will be seven different brands of coffee in identically-sized bags, yet one may have 5.7oz of coffee and another will be 12.8oz.
It's on us though. They're lying to us to get our money, our labor, our consent. We let them.
Why?
The varying of quantities in the same sized container is not the problem and is certainly not illogical. The problem is when we allow marketing departments to lie/cheat/fool the product onto a different portion of the demand curve instead of letting the $/amount naturally flow back when price decreases or when it makes sense to switch to cheaper containers.