The same reason that you have to go and earn a living, even though G-d gives you what you need for food, clothing and shelter.
Because G-d wants you to engage in the world and transform it, not live outside it.
To quote the Lubavitcher Rebbe:
We are commanded in our holy Torah, the Torah [of Life, emanating] from “the Living G‑d,” that concerning our health we are to meticulously obey “doctor’s orders,” since “Permission was granted the healer to heal,” and the doctor serves merely as an agent [of G‑d to achieve healing].
Understandably, it is perfectly fine to voice your protests and opinions regarding the doctor’s [prescribed] course of healing — including the notion you wrote to me. However, after the doctor hears you out [and then renders his final opinion], you are to follow his instructions whether you logically agree with them or not.
For, as stated above, the doctor is no more than an agent who heals at the behest and with the permission granted to him by the Torah; [and] since this [power to heal] emanates from the Torah, [the doctor’s orders] are equally beneficial to body and soul.
[The above is true] even when one does not understand the [Torah’s] reasoning [for following doctor’s orders] or thinks differently — which in itself is also not surprising, as Torah is G‑d’s Divine will and wisdom, and thus it is no wonder that not everything the Torah states is comprehensible to man.
However, [it is quite clear that] man must follow all the dictates of the Torah, even when they are not understood — and understanding will eventually follow.