A few things:
1) Adult bladders are larger, we're more experienced in judging the severity of our needs so we're unlikely to hold it to the point of physical injury. In kids, especially when they've been trained to artificially "hold it in" by schools, they become less sensitized to their needs and can develop problems ranging from UTI's to incontinence.
2) Teachers went to the bathroom all of the time when I was in school, they'd pull the school nurse, or a secretary, or teacher's assistant from somewhere to watch the class for a few minutes.
3) Taxi drivers can stop in between trips.
4a) Bus drivers on long-hauls can stop at rest stops, and do so regularly both for themselves & their passengers.
4b) Apart from city buses, many buses (like Greyhounds) have a bathroom on board so a rest stop isn't even required, just a pull off to the side of the road & take their keys with them to the back of the bus
4c) Buses that run frequent stop local routes, There's generally a place to go at each end of the route, but there is actually employer abuse in this area with schedules so tight and penalties for running behind schedule meaning the have a place to go is only one of the concerns. Wearing adult diapers isn't uncommon, and transit unions routinely fight for bathroom rights. But this awful situation for a certain group of workers is not at all a justification for inflicting similar constraints on other people, much less children with developing bodies.