Cancer can cause significant pain due to various factors such as tumor growth, metastasis, and treatment side effects. Morphine is often prescribed for its effectiveness in providing relief from chronic pain, thus improving the quality of life for cancer patients. It is particularly useful for pain management in advanced or palliative cancer care.