The answer is simple: Milk needs to be refrigerated. Rectangular containers occupy less shelf space, and less shelf space is more valuable when that shelf space has to be cooled. Soda pop cans and the like are kept at room temperature on the cheap metal shelving found elsewhere in the store (or arrayed into huge pyramids at the end of aisles). Of course, one might make the argument that every container should thus be square, to maximize space, but there is an added benefit to the consumer, one that seemingly overrides the extra cost in lost shelf space: The ability to comfortably hold the container in one’s hand. This benefit, while great, is presumably not greater than the cost of refrigeration — hence no array of round milk jugs.
Read more at the Design Observer.