Did you ask these cab drivers why did they pursue a PhD with the associated cost in time and money if they knew in advance there is no opportunity to use it? Most people that I know with a PhD working outside universities did it for status or for spending some more years studying and not working, not because they needed it.
Completely anecdotal data, but in my experience in Argentina people just study what they want just because, in general there isn't an economic reason.
Argentina's public universities are tuition free, backed by the state, so you don't have to spend any money to study anything you may want, which leads to people choosing non economically viable careers (PHD in social sciences and other stuff), I think in part because they don't have any cost to recover from, as well as people not liking math.
The number of people going into STEM is super low, despite paying much better than other careers, and also allowing you to go to other countries to work. As an example, the School of Psychology in the University of Buenos Aires has around 16k students distributed across 4 degrees (Psychology, musical therapy, and 2 more), whereas the School of Exact and natural sciences had around 7k across ~10 degrees (comp sci, math, physics, geology, biology, chemistry, paleontology and some other I'm forgetting).
Comp sci alone probably has 1000 active students.
The school of engineering has around 8.5k across several engineering degrees.