Because that's literally what workforce planning is about? Australia had a very similar problem in the past with huge medical and nursing vacancies. Over years, they've trained more and more medical students, more and more nursing students and (importantly) pay and treat them well and now their service runs incredibly well, with a high number of local graduates but also still immigration where its needed.
There is a difference between allowing recruitment of overseas workers in the healthcare system and active recruitment drives in one of the richest countries in the world from countries significantly poorer than it because they can't be bothered to train enough themselves/ retain them. One is fine, the other is actively immoral.
Healthcare workers are an incredibly valuable resource and cost countries a lot of money to train. It is incredibly immoral for the UK government to plunder Nigeria, Ghana, Egypt, Iraq, Pakistan, India, Bangladesh, the Phillipines and recently Nepal and Myanmar too with active recruitment drives to bring thousands of those people over.
Nepal has 0.17 doctors/1000 people and 0.5 nurses. The UK has 3 and 7.8.