Steroids suppress inflammation and that's what causes the damage in UC. However since when you stop the steroids the inflammation gets even worse it shows that whatever the cause was, it's still there. If you keep suppressing the immune system then bacteria can indeed invade the body and cause other diseases for which the symptoms would initially be masked, such as cancer. Steroids however don't entirely suppress the immune system as they don't affect natural killer cells, and the suppression depends on the dosage but it's still very risky as with all immune suppressants.