Do you really need a standardized bottle for this? As long as the shampoo dispenser measures how much product it dispenses, it doesn't matter what it dispenses into.
I suppose the machine (or attendant) needs to know what to do if the customer tries to buy 330ml but only has a 250ml bottle, and they might feel cheated if they over-fill the bottle and some product leaks down the side, but shops will be incentivized to make this less likely to happen if they want customers to come back.
There might also be a problem with cross-contamination of unclean containers touching a nozzle, which is taken seriously by some in the food service industry[0], but hasn't stopped restaurants offering Coca-Cola Freestyle machines to customers.
[0] https://cellarcraftuk.com/cross-glass-contamination-legaliti...
You specified size in ounces, why not metric? I'd read up on that a bit and if you don't lose all hope after that, come back and we can talk about the rest.
this might fly in the Germanic countries (sans England), but in most Western countries the corporate pushback would be far too high.
even if long-term it would be cheaper, businesses a) don't like change, and b) don't like being restricted in any way whatsoever. imagine how hard coca-cola would lobby to keep using their classic bottle design. imagine how easy it would be for the corporate-owned press to sell this as Sovietism reborn or some other such nonsense
I feel like in America and the more right-wing countries, you're far more likely to be seeing a law enshrining the future rights of businesses to non-homogeneity
*America, based on your use of fluid ounces