Of course, that's a risk the student takes. But it's ridiculous that Britain has people willing to pay many tens of thousands of pounds towards their education, but is not willing to employ them after they graduate.
By the time we were graduating, the USA had mostly closed the normal routes for immigration for these students. It was possible, but far more difficult than simply staying in the UK, so most decided to stay in the UK. Of course, living there for 3-4 years helped, but the simple process for a skilled graduate to get a visa was also attractive.
Nowadays, my impression is a similar group of students would be looking to Canada or Germany.
These were graduates of Imperial College, and I had friends at Cambridge with the same experience. When immigration policy doesn't make it straightforward even for the top 0.1% (or whatever) of graduates to stay, the policy is seriously broken.
There is absolutely no economic justification for this, it's just Theresa May (when she was Home Secretary) being necessarily draconian to the detriment of everyone.