When state and Federal laws conflict with one another, such as the medical marijuana laws in some states, individuals can still be prosecuted on the Federal level. This is so even when the state would not press charges. In other words, Federal law supersedes state law. Doctors must take part in DEA registration and obtain a DEA license in order to prescribe certain medications. Those numbers are used to track doctors and the prescriptions they write.
DEA registration also prevents doctors from breaking Federal law when it conflicts with a state law. For example, some states may allow for medical marijuana to treat some illnesses, such as cancer and anorexia. However, medical marijuana has not been approved by the Federal Government and it can be prosecuted as a Federal crime. In fact, the DEA could prosecute the user, the doctor and the individual that dispensed the prescription for the medical marijuana.
DEA registration and a DEA license are meant to prevent the abuse of power held by doctors. They cannot circumvent the law simply because they are doctors. In addition to following all applicable local and state laws, they must follow Federal laws. In fact, doctors can have their licenses revoked if they break Federal laws. They can also have their licenses suspended if the DEA investigates them because they suspect that they have been dispensing too many controlled dangerous substances.