Why is the US producing 25,000 more lawyers than it needs?
Why is this happening in a supposedly rational maximally efficient - or close offer - market economy?
The simple answer is because someone else profits hugely from the money they pay for training. Which in turn is a symptom of an extractive economy, not a productive economy.
A productive economy would do a much better job of allocating talent to social requirements. But an extractive economy is optimised for short-term gain of a small overclass - not the medium/long-term opportunity-growth of a strategically generative economy.