It's not a matter of being disallowed, it's a matter of convenience and comfort. If a woman is working a factory or a large department store, she may have to pump in the restroom. That's not exactly a comfortable or convenient place for it. Far different from an office which offers a quiet room with a comfortable chair or couch for her use.
Beyond that, there's also the matter of storage. Breastmilk is unpasteurized and needs to be refrigerated immediately for safety reasons. In an office, it can be as easy as putting the bottle in the fridge in the staff room. A fridge may not be available in other workplaces.