Question about steroids

My father has advanced prostate cancer. It’s now in his spine, hips and ribs. Every time he goes into hospital he comes out with a course of steroids and he’s so much better when he’s on them but he isn’t allowed to stay on them. Why is that?