Palliative surgery is considered when other treatments, such as chemotherapy and radiation therapy, are not effective in managing symptoms. It is often used in late-stage cancer when the primary goal is to enhance comfort rather than extend life. This type of surgery can be essential in cases where tumors cause significant pain, bleeding, or obstruction in vital organs.