This is a great question. I think we should differentiate the perceived "nature" of different diseases. There are two aspects to it:
General providence - השגחה כללית -, i.g. plain biology. Those are diseases that are "inevitable" or "natural", everyone would get sick if certain conditions are met.
Private providence - השגחה פרטית, namely person's luck, unusual or exceptional cases unexplainable by current understanding of #1.
For centuries, most diseases fell under the second category - illnesses were perceived as G-d's anger or punishment, atoning suffering etc. For such attitude, interference with G-d's plans would be considered bad conduct, healing someone's fate would be a sort of blasphemy (which it was indeed for centuries in many religions). Just as we don't try to save somebody sentenced in a Rabbinic court, we don't try to save somebody sentenced in the Heavenly court.
(Needless to say that the in contrary, any intervention to the first type of disorders is readily allowed just like coping with any natural situation - if you're hungry you eat, if you're thirsty you drink etc.)
So the Torah brings a big Chiddush here, related to the similar Gemmorah's (B"B 10a) discussion on G-d's relations with the Jewish nation: either as His slaves or His sons. The Gemmorah asks:
"...מלך בשר ודם שכעס על עבדו וחבשו בבית האסורין וצוה עליו שלא להאכילו ושלא להשקותו והלך אדם אחד והאכילו והשקהו כששמע המלך לא כועס עליו?
ואתם קרוין עבדים..."
"[if] king of flesh and blood who was angry with his slave and put him in prison and ordered that he should not be fed or given to drink. And one person went ahead and fed him and gave him to drink. If the king heard about this, would he not be angry with that person? And you, after all, are called slaves,"
We can see that if we behave like slaves, doctor's intervention will be perceived as negative, as overriding G-d's orders. the Gemmorah continues:
אמר לו ר"ע אמשול לך משל למה הדבר דומה למלך בשר ודם שכעס על בנו וחבשו בבית האסורין וצוה עליו שלא להאכילו ושלא להשקותו והלך אדם אחד והאכילו והשקהו כששמע המלך לא דורון משגר לו ואנן קרוין בנים דכתיב (דברים יד, א) בנים אתם לה' אלהיכם
Rabbi Akiva said to Turnus Rufus: I will illustrate the opposite to you with a different parable. To what is this matter comparable? It is comparable to a king of flesh and blood who was angry with his son and put him in prison and ordered that he should not be fed or given to drink. And one person went ahead and fed him and gave him to drink. If the king heard about this once his anger abated, would he not react by sending that person a gift? And we are called sons, as it is written: “You are sons of the Lord your God”
So, if the Jews are seen as G-d's sons, everyone who helps them, even if their father's angry with them, is welcomed and well compensated.
Because we see the Jews as G-d's sons a doctor has the right to heal.