This is common for teachers in many US states too -- spend X years teaching where we need you the most and we cover your degree.
In the US a teaching degree might be $50,000, and medical degree might be $500,000. I'm not sure I want my state government covering half a million in education costs for one person... I know that we need doctors but I'd want to see some ROI numbers to justify such a high expense.
There was an article posted on HN recently about the asymmetry in cost of providing an ambulance service vs the cost of the per-ride service. The cost of a medical degree, and the training on top of the degrees, may seem waaay too high but I am sure that when you need the service you want it to be there. I think if I break a leg, need an emergency surgery, etc I will be okay with $0.00001 of my taxes going into the pile needed for paying off those $500k loans.
One of the teachers I know had to pay for 7 years past their forgiveness date of 10 years teaching because of the student loan shenanagains in the early 202's and then the shutdowns. Luckily finally she got the loan closed ans is still waiting on the 10% back for paying over.
The National Health Service Corps (NHSC) Scholarship Program and Indian Health Service Scholarship Program will pay for medical school in exchange for agreeing to work in underserved areas for several years. Some states have similar programs. I'm not sure how you would even begin to calculate ROI for that.
https://www.congress.gov/crs-product/R44970