Medical ethics in many countries do not allow for either euthanasia or physician-assisted suicide. In those countries, physician's believe there role is to extend life and improve quality of living. Euthanasia and physician-assisted suicide do not extend life or improve its quality. However, in some places physicians are free to use their own judgment about what is appropriate.
Professional organizations typically codify medical ethics in their country or region. There is also a World Medical Association that works to provide ethical guidelines for physicians in all countries. I'll review medical ethics in the United States, Canada, and the World Medical Association to show that euthanasia and physician-assisted suicide are generally incompatible with medical ethics.
Finally, there are definitely countries whose medical ethics do allow for it, so this explanation should not be construed to be a complete causal theory.
United States - Not Allowed
In the United States the professional association for physicians is the American Medical Association. Their professional ethics guidelines include sections on physician-assisted suicide and euthanasia.
Regarding physician-assisted suicide:
Physician -assisted suicide is fundamentally incompatible with the physician’s role as healer, would be difficult or impossible to control, and would pose serious societal risks.
Instead of engaging in assisted suicide, physicians must aggressively respond to the needs of patients at the end of life.
Euthanasia is fundamentally incompatible with the physician’s role as healer, would be difficult or impossible to control, and would pose serious societal risks. Euthanasia could readily be extended to incompetent patients and other vulnerable populations.
Canada - Allowed by Medical Ethics
According to the Canadian Medical Association, physician's are free to decide on their own whether to practice euthanasia or physician-assisted suicide. Although their ethical axioms don't directly address either of these things, they do provide guidance. Their guidance is that physician's are free to exercise their judgment, so long as it complies with their ethical obligations (to the well-being of the patient, patient autonomy, to obey the law, etc.)
The same document says that Canadian law does not allow for these (as of the time of writing), but that the guidelines are intended to apply even if the law changes.
World Medical Association - Not Allowed
The World Medical Association promulgates professional ethics for physicians globally. They have publications about euthanasia and physician-assisted suicide: their medical ethics do not allow for either.
The WMA Statement on Physician-Assisted Suicide is pretty straight-forward:
Physician-assisted suicide, like euthanasia, is unethical and must be condemned by the medical profession. Where the assistance of the physician is intentionally and deliberately directed at enabling an individual to end his or her own life, the physician acts unethically. However the right to decline medical treatment is a basic right of the patient and the physician does not act unethically even if respecting such a wish results in the death of the patient.
Similarly, their Declaration on Euthanasia says:
Euthanasia, that is the act of deliberately ending the life of a patient, even at the patient's own request or at the request of close relatives, is unethical. This does not prevent the physician from respecting the desire of a patient to allow the natural process of death to follow its course in the terminal phase of sickness.