We miss out on people who would make great teachers because they aren't good at doing research, and some potentially great researchers are left out of academic research because they are horrible at teaching
Dubious. The labour market is so flooded that institutions above the barrier can for "on-going" positions select who they like within the wage's established differentials. For bulk teaching, most Universities are reliant on casual staff who they sweat with the hope of an on-going position. So this statement is, outside of markets with limited labour supply, junk.
As far as the oversupply of labour, the Employers have a very good reason to offer more candidatures for PhD than the required number of future jobs plus a friction load for losses to industry practice. They're "deskilling."
They're also changing the nature of the commodity on offer (check word limits, class sizes, expectations of self-activity over a 30 year scale for undergraduates); and, of course, attempting mechanisation. From what I've seen mechanisation isn't increasing worker productivity, but, rather is more important in breaking down work cultures.
How did this happen?
Proletarianisation, commodification, and capitalism. Ford & Taylor, my friends, Ford & Taylor.
You could suggest that it happened in countries without strong Academic industrial organisation (The United States, for example) due to particularism. But actually we can see the broad effects of this universally across "varieties of captialism" to greater or lesser extents. That it happens in undergraduate teaching and in research, with their different world markets, is indicative that it isn't just particular systems.
Who does it benefit?
It directly benefits the bourgeoisie, as capital flight into newly commodified areas results in a period of primary accumulation, and as secondary accumulation takes off it often has a higher rate of profit. Basically, there's superprofits in Tertiary Education.
It also benefits consumers. Tertiary education is largely a required commodity to consume, see for example Australia's rate of tertiary education uptake. The more important question is why consumption is over biased (given the knowable workforce demands from employers) towards Higher rather than Further or Vocational tertiary education? Here I'd suggest that many, if not most, jobs don't require tertiary education to perform, and instead employers are getting labour discipline benefits. Consumers still gain some measure of benefit from the enjoyment of education, and the possibility of subversively exercising education in their employment anyway. Also, with the massification of higher education many more consumers get to enjoy this commodity in its dissipated "University" form rather than through Workers Educational Associations, Trade Union newspapers, or Party Education. (Personally, comparing the level of discourse in 1940s TU newspapers to contemporary bits of the internet where equivalent age bands try to discuss serious matters, I'll go with the "non-traditional" education system here for superiority.)
Research culture is a side effect of the commodification of undergraduate teaching. In 1987 when Australia commodified undergraduate education (HECS), it also began the audit of research (The "Publications" return portion of the current HERDC report). It has taken 25 years, and changes in the control over production in departments, but effectively HERDC points act as a method of realising research activity, in a similar way that the "Effective Full Time Student Unit" realises as a commodity teaching.
As far as the teaching / research nexus: using publicly available data I'm pretty sure that even in research intensive universities, all research outside of grant funded substantive positions is done as "overtime." Going back to the labour supply and generation of PhDs: the employer inculcates in apprentices the idea that 60 hour weeks are normal, and that the employer should have exclusive use of the employee for teaching and service for the "normal" working week. The natural form of resistance and sabotage to this would be to not publish. The results of not publishing is the guaranteed absence of an on-going position.
Sources: Vestes/AUR; Trade Unionism; long term wage/price series; managerialism & audit culture; Braverman on deskilling & proletarianisation