Emergency Rooms are not for managing chronic pain, or any chronic disease, for that matter. They exist to treat emergent conditions, like blood spurting from an artery.
Anything less than that, the job is to stabilize a patient, and send him or her along for appropriate follow-up; hospital admission, as necessary, or back to the patient's primary care provider.
A patient with chronic pain should follow up with primary care or pain management. If the ED prescribes more than a few days-worth of narcotics, it dissuades a patient from seeking appropriate follow-up; they just keep coming back for meds. The situation gets worse if the patient (like a lot of people in the US right now, unfortunately) doesn't have a primary care provider. No one is keeping track of how much medication the patient is getting, ordering appropriate monitoring labs for the patient, avoiding potential drug interactions, etc.
For example, I have a patient who is visiting with a mental health provider on a regular basis. Her current medication schedule does not include any benzodiazipine meds (alprozolam, lorazepam, etc). So her MH provider, a colleague of mine, is prescribing medications she judges to be appropriate treatment for the patient. However, I received an alert from the local Emergency Room that the patient presents regularly for prescriptions for clonazepam (which incidentally is the most widely abused prescription medication in the country right now, and responsible for the most deaths by overdose). If I didn't pass this info along to my mental health colleague, she might unknowingly prescribe a med that could cause a fatal interaction with the clonazepam the patient isn't supposed to be taking. Mandated restrictions on meds, and alerts to primary care providers are a good way to avoid deaths by overdose.
Okay. "How-dare-you-deny-me-my-medications-you-sadist?" in 3...2...1...