A colostomy may be necessary in cancer patients when the colon or rectum is affected by cancer, particularly in cases of colorectal cancer. It is often performed when a tumor is obstructing the bowel, or if the cancerous tissue needs to be removed. Sometimes, a colostomy is temporary, allowing the colon to heal after surgery, while other times it may be permanent if the cancer has caused extensive damage.