>In other words, the 1/2-gallon container, buy two of those, and it costs significantly more than a single 1-gallon container.
Except sometimes the 1/2 gallons will be randomly on sale where you can get like 3 of them for the price of a gallon. Milk economics makes no sense to me. But yeah, it's usually cheaper to buy more than you need and just throw it out if you don't use it, as is the American way.