For super obvious reasons. A developers cost is almost entirely their time. That is the "unknown" for a developer.
For a doctor, the unknown includes many possible things like drugs administered, blood administered, emergency care, hospital costs, etc. It's not as simple as an hourly rate estimate, unfortunately.
I mean, every time I've dealt with a contractor it's time and materials. And the markups that hospitals charge on materials would be considered fraudulent by a court if someone tried to pull that as a freelancer.
For a doctor, the unknown includes many possible things like drugs administered, blood administered, emergency care, hospital costs, etc. It's not as simple as an hourly rate estimate, unfortunately.