Professional liability and licensure would create assurances with some teeth, but there are some major drawbacks.
The job interview for doctors is a 5-7 year residency under tight supervision of an attending physician: https://en.wikipedia.org/wiki/Residency_(medicine) . People do flunk or drop out as well, meaning they can never become a physician. There's nothing easier about that.
(I'm not sure whether I agree with the commentator that a SE license would be that helpful in practice.)