In the US, candidates to become physicians go through a 5-7 year residency which has low pay, dangerously long hours, and has a supervisor watching over them who can flunk them for failing to meet their standards. That's _after_ a normal bachelors degree and then medical school. Does that sound like something anyone would like to go through to become a software developer just to avoid technical interviews?
It’s not just medicine. No other job does solve this question on a whiteboard style interviews for anyone other than new grads.
The closest thing you’ll find is actors and musicians auditioning. But performing is an actually a part of their job.
Nurses only have 4 years of school and they don’t have whiteboard interview equivalents. Medical technicians don’t either and they don’t even have degrees in most cases.
Also one minor correction most residencies are 3 years, although some are longer.