Take a look at what you pay for health insurance and then get back to me.
According to test scores, our best and brightest don't go to med school and haven't for about 50 years. So I'm not sure the argument about restricting the number of med school slots to preserve quality really holds any water. Also, a lot of the job of being a doctor isn't all that mentally taxing. There are a lot of specific procedures to follow and having really good coordination is a big plus. Technique is required a lot more often than brilliant insight. Bedside manor doesn't hurt either. None of these things are limited by test scores. So no, it probably doesn't benefit society but it definitely benefits those that are already practicing.