We tend to think of "consumer protection legislation" as a rather modern invention, but it is actually centuries old.
The weight of a loaf was first subject to regulation in 1266. From 1822 a loaf of bread had to weigh 1lb (or multiples thereof). This size was reduced to 14oz during the second world war and changed to 400g after metrication in 1977. The weight of bread was finally deregulated, to comply with EU rules, in 2008.