I've read that as long as you keep the bean picked, the bush will keep flowering and producing. To anthropomorphize: to the bean plant, it hasn't fulfilled its main objective of reproduction, if it hasn't made viable bean seeds. So if you keep picking the beans, it keeps making more.