See the 'Background' section on page 11 of https://www.nist.gov/document/sp1181-unit-pricing-guidepdf and more generally https://www.nist.gov/pml/weights-and-measures/laws-and-regul.... So yes, it was done purely to address consumer demand... by way of laws and regulations with producers and retailers under threat of even more onerous laws and regulations.
A contemporary example to hopefully convey the situation back then: if 'right to repair' becomes law at some point, this would also be due to consumer demand. Notice the level of interest companies have in addressing this consumer demand prior to legislation being passed...
Price/oz
Price/lb
Price/bar
Price/unit (which might be bar or package of two bars)
So you get tk calculate the difference in your head.
Do you have a source for the $/Oz being due to bad behavior? From what I’ve heard it was done purely to address consumer demand.