Never said otherwise.
But doctor in most cases never really treats you.
First thing to know is: the body heals itself. People can only do to create the circumstances it can do that.
For example a surgeon can put a broken bone to place and then an assistant fix the parts in place with a cast, but from there the body mends the bones.
Or the physician can prescribe you antibiotics against certain germs, for this example let's say a type of bacteria. Antibiotics is a poison that kills that bacteria - and some of the bacteria your body needs too and even perhaps some of your cells. It can't kill you (as long as you just take what prescribed), but it harms you too. Also it does not heal you. What antibiotics does is reducing the amount of bacteria so your body can deal with the rest and heal itself from the harm the bacteria and the antibiotics itself caused.
Beyond this the body needs water, nourishment, and rest so it can do its job. In case of some common illnesses - such as common cold which can be caused about over 300 types of viruses (such as covid) - that is all we can do really. The doctor also can say: bed rest, drink lotsa fluids (classic tea with honey and lemon example), take care your temperature doesn't go too high. That's all.
Seeing a doctor, or rather a doctor seeing you can have psychological effect on the patient. He will imagine he is "treated" by a professional who knows what he is doing and then the body of the patient (comforted by the thought) will heal itself better.