The are also called computer grade UPSes - because they can
output square waves (modified sine waves) with so much
harmonics as to even damage some small electric motors. But
since computers are so resilient, then that 'dirty' UPS
output (only when in battery backup mode) will not harm
properly constructed electronics.
As noted elsewhere, those square waves simply recharge front
end electrolytic capacitors typically to 320 volts DC. Then
the power supply sips electricity from those capacitors to
operate the computer. Those electrolytic capacitors will
remain charged whether the incoming AC is a sine wave or a
square wave.
In addition, minimally sufficient power supplies will also
contain line filters. Although intended to keep RF
interference inside the machine, those filters also make that
square wave more sine like - just another layer between
electronics and the 'dirty' UPS output.
Meanwhile, a UPS may output 'dirty' square waves only during
battery backup mode. Most of the time, the UPS connects
cleaner sine waves, direct from the AC mains, into the load.
Those square waves only exist during rare battery backup mode.
Some third party power supplies are so inferior as to be
easily damaged. IOW essential features such as the line
filter, sufficiently sized electrolytic capacitors, and other
'cost cutting' measures could mean dirty UPS electricity
causes power supply failure. Its not a problem created by the
UPS. Its a problem created by bean counting computer
assemblers who don't even have basic electrical knowledge; who
purchase inferior power supplies only on price.
Again, they are called computer grade UPSes for good
reason. Electricity so dirty that it can even harm a power
strip surge protector attached to its output. Called
'computer grade' because computers must be a most resilient
appliance connected to AC mains.
An example: this plug-in UPS creates a modified 120 VAC sine
wave. IOW it creates two 200 volt square waves with a spike
of up to 270 volts between those square waves. Output not
destructive to computers as even required by Intel specs and
other industry standards. Just don't power other less
resilient appliances (ie small electric motor) with this UPS
when in battery backup mode.
Meanwhile some laptops have another problem with that so
dirty UPS output. Laptops monitor AC input and switch over to
internal batteries if AC power does not measure sufficient.
IOW some laptops running on a computer grade UPS will remain
powered from batteries and not recharge laptop's internal
batteries. This because of how AC voltage is monitored AND
because that UPS (in battery backup mode) outputs square
waves.