They don't. Doctors in the NHS work longer hours than their U.S counterparts, and those who go through the system tend to move to either private practice, Australia, or the U.S after their residencies. For now, the system is still working, but it's clear that medicine is a much less lucrative/desirable job in the U.K than, for example the U.S. (And maybe that's a good thing – I don't know).