EG: bus driver.
So I am actually not sure how that works for a pregnat bus driver. Letting her randomly stop the bus at rush hour to pee doesn't seem fair to the commuters. Probably in practice pregnant bus drivers get assigned to a short route or something like that.
I don't know the nature of Amazon warehouse work. It's possible that unscheduled bathroom breaks affect multiple people (eg, I am peeing and you are idle because you depend on me to do your task) - that's the only condition where this feels at all conscionable.