Whether utility power is clean or not is not really the issue at hand.
In an ideal environment utility power is going to be a clean sinuous signal at 50/60Hz depending on your location. Whether you have a customer nearby with arc furnaces running on 50MVA 33kV feeds -
http://www.youtube.com/watch?v=ijWwfcw0FOo - (which will wreak havoc) or loads in your facilities doing similar - there will be issues to start with.
Most appliances and devices are designed with a tolerance to hash, spikes, harmonic distortion and other anomalies. These should be reduced whenever possible especially when sensitive devices are in use or in areas where lack of noise "riding" the waves is paramount such as recording studios.
There are several ways to combat this which can be expensive. Yes it's always about the price, right? One should never expect a $50 UPS made in China to correct issues with power on a particular circuit. An electrician is usually retained to make sure the physical layers are adequate - performing wiring polarity tests, proper ground and voltage drop with a momentary load test. If everything passes here and there is still a problem then the line quality monitors (Dranetz) are brought in typically for a few days to a week or more to monitor quality over a period of time to nail the culprit.
In many office environments a long run with a laser workgroup printer, for example, can cause many headaches! Look at the waveform on a circuit that has one while its fuser heater circuits are active. The sudden dips in voltage will always trigger a UPS transfer function. These low end UPS' IMO have too short of a duration before switching back to mains power and their relays can be heard rapidly cycling back and forth under these conditions. This hysterical output is very challenging to many switching mode power supplies (SMPS) to deal with and can result in sporadic reboots or locking of PC loads, etc.
The problem with the entry level - very entry level of UPS - as I mentioned previously is they are just inadequate for protection in such a common scenario. No true power conditioning is present. An LC hash filter and MOV is NOT power conditioning! Most have too high a clamping value in the first place and use cheaper components of what's used in decent PC PSU on the input side!
If you need true power conditioning a ferroresonant transformer will provide proper regulation and superior filtering. Your loads are essentially isolated from the mains at all times. There is also zero transfer time to inverter with UPS that employ this method.
The waveform in the previously mentioned article is downright scary and if I saw something like that I would prefer to run right off the mains until it was corrected!
To recap when dealing with "dirty" power the culprit is not the power source itself but things that happen along the way getting it to your load! Often wiring faults and chosen conductor type can have serious impacts on power quality as well.
Since flicker was also mentioned I will add that newer types of lighting including self ballasted compact fluorescent lighting using high frequency switching as well as LED lighting often are much more stable and thus more immune to power glitches (in regards to intensity shifts) than incandescent lighting. One can clearly see this by plugging a lamp into an outlet with a laser printer. If the lamp has a 60W tungsten lamp the flickering will be much more prominent over a CFL or LED light in the identical scenario. It also depends on the lamp driver too. An electromagnetically ballasted fluorescent lamp has worse flicker due to its quicker fall time. A filament lamp tends to be buffered as its filament output decays slower as it cools. When traffic lamps are in flash mode one can immediately identify LED vs. Tungsten signal lamps from this effect. LEDs extinguish nearly instantly.
Consequently an LED driven off nothing but a resistor and half wave rectifier will flicker quite badly on AC mains power particularly at 50Hz.