I've hang out with my fair share of taxi drivers around the world (mainly Europe and South America) but never once heard of them being forbidden of not accepting customers, and heard plenty of stories when someone really fucked up tried to hail them but they declined. It doesn't mean it's not forbidden, but hard to reconcile my understanding.
What places are you specifically thinking about where taxi drivers are not free to chose their customer?
Human Transportation Act §22 Duty to Transport.
For example in my part of the UK, only designated taxis can pick up ride hailers on the street, sort of like black cabs in London.
Private firms who use their own fleet of cars can only offer pre-booked services, e.g. pre booked airport runs.
Uber and co. shook this up a bit by offering a grey area, where the taxi ride isn't exactly hailed on the street (instead through the app) and is sort of "pre-booked" when you request it as the driver has to accept the job.
Yeah, that makes sense, that's the only thing I've seen around the world as well. But can these designated taxis reject customers at will? That was my question.
UK:
"Cabbies can be penalised for refusing passengers" https://www.lta.gov.sg/content/ltagov/en/newsroom/2019/8/3/c...
Canada - Montreal:
https://ville.montreal.qc.ca/pls/portal/docs/page/bur_taxi_f...
"Le titulaire d'un permis de chauffeur de taxi ne peut refuser d'effectuer une course"
France:
"Normalement, un taxi n'a pas le droit de refuser une course sauf si vous êtes à 50 mètres d'une borne de taxi et qu'un taxi attend à cette borne"
https://www.europe1.fr/societe/taxi-ce-qui-est-legal-et-ce-q....
and so on...