The building might be on a generator. The whole building is most assuredly not on UPS.
Even in hospitals only certain outlets are on UPS - the stuff that absolutely cannot be interrupted - though a lot of hospital equipment now has its own battery system, at least in part for convenience.
I don't know if it's still done but semiconductor plants used to use intertia-based grid smoothing/UPS systems to handle millisecond-level interrupts and voltage fluctuations.