I think the problem is that physicians are self-selected to be highly intelligent and driven individuals. Med school is not at all a walk in the park, and is very competitive.
You cannot compare the median physician who endured the years of grueling med school and residency to an average developer. FAANG is probably a more apt comparison.