Many servers have two power supplies. You have several options about how to use them but one I have seen quite often is to plug one directly into the mains and the other into a UPS.
Advantages include being able to run on UPS if mains goes down (obviously) but also to run on mains if the UPS cooks itself.
However, quite a lot of equipment only has a single power supply - things like routers, switches, and so on. Is there a relatively sane way of connecting these lesser devices to two sources (e.g. UPS and direct to mains)? Everything I come up with in my mind has potentially severe safety issues. Issue that made e think of this was the need to replace a dead UPS - server presented no problem but users were inconvenienced by the switch and routers having to be powered down.