Why do doctors prescribe methadone for heroin addiction?

Can you answer zed hex’s question about Addiction?:

The withdrawals from methadone addiction take 3 times longer than for heroin (3 weeks against 5 days), and are more painful. I suspect that methadone is preferred simply because it does not give such an intense high as heroin. The medical profession seem to think that getting their patients hooked on a much worse drug is acceptable just as long as no one actually gets high.

Perhaps their interests are more puritanical than medical.
The responses so far seem to miss the point - I am commenting on the hypocrisy of prescribing something more dangerous (methadone) to ‘treat’ a something less dangerous (heroin), for reasons of moral convenience (no high to get guilty about, and easier maintenance). Isn’t this simply unethical? One of the basic tenets of the hyppocratic oath is: “above all, do no harm”. This gets conveniently forgotten about when dealing with what society deems “self inflicted” problems such as addiction.

Prescription Pain Killer Addiction