UPSes are a bit like insurance against damage to your data due to dirty power; like all insurance, their cost needs to be weighed against the cost of the unexpected loss or corruption of data happening at the worst time.
In theory, modern operating systems are robust when power is yanked unexpectedly (DOS and non-NT-based Windows don't count as modern, by the way -- they barely count as operating systems).
However, in practice, when a computer attempts to recover from being unexpectedly shutdown, it might restore consistency to the file system by deleting anything that seems out of place. That can include all your recent work, if it was only partially saved, or if it was in the process of being updated when the power went. This can actually be hazardous to data that wasn't being directly updated, since consistency can mean: "that directory is in an unknown state, because a file in it was being renamed, so we need to remove the whole thing in order to restore its consistency".
Many file systems have what's called journalling, a technology borrowed from high-availability database systems, which works to recover data that was in transit when the power went. But you might find that its default configuration only protects the structure of the file system, and not its contents, since it can impose a performance penalty.
Note that things like RAID 1 won't help you here, because they're primarily protection against individual hard disks failing, not power to all of them at once.
How does a UPS help? Well, even if it only provides a few minutes of power to the computers which hold your work, that's enough for them to be shut down in an orderly fashion. Even fairly cheap UPSes come with a cable that can be plugged into the computers they're protecting, and this lets them be notified that power has failed. The computer can then perform shutdown actions (as well as send an alert, perhaps) once available battery power drops to a critical level.
The other useful function a UPS provides is to hide brown-outs, where the mains power doesn't fail, but dips momentarily to a level that's too low to let the equipment work right. In my experience, these are more common than complete power failures, and can leave computers in a highly weird, and generally unusable, state if they're not smoothed out by a UPS.
Of course, many computers have UPSes built into them these days anyway; they're called 'laptop batteries', and can lend a false sense of security to those who're used to the consequences of having the protection they offer, protection that isn't available by default in servers and workstations.
In theory, modern operating systems are robust when power is yanked unexpectedly (DOS and non-NT-based Windows don't count as modern, by the way -- they barely count as operating systems).
However, in practice, when a computer attempts to recover from being unexpectedly shutdown, it might restore consistency to the file system by deleting anything that seems out of place. That can include all your recent work, if it was only partially saved, or if it was in the process of being updated when the power went. This can actually be hazardous to data that wasn't being directly updated, since consistency can mean: "that directory is in an unknown state, because a file in it was being renamed, so we need to remove the whole thing in order to restore its consistency".
Many file systems have what's called journalling, a technology borrowed from high-availability database systems, which works to recover data that was in transit when the power went. But you might find that its default configuration only protects the structure of the file system, and not its contents, since it can impose a performance penalty.
Note that things like RAID 1 won't help you here, because they're primarily protection against individual hard disks failing, not power to all of them at once.
How does a UPS help? Well, even if it only provides a few minutes of power to the computers which hold your work, that's enough for them to be shut down in an orderly fashion. Even fairly cheap UPSes come with a cable that can be plugged into the computers they're protecting, and this lets them be notified that power has failed. The computer can then perform shutdown actions (as well as send an alert, perhaps) once available battery power drops to a critical level.
The other useful function a UPS provides is to hide brown-outs, where the mains power doesn't fail, but dips momentarily to a level that's too low to let the equipment work right. In my experience, these are more common than complete power failures, and can leave computers in a highly weird, and generally unusable, state if they're not smoothed out by a UPS.
Of course, many computers have UPSes built into them these days anyway; they're called 'laptop batteries', and can lend a false sense of security to those who're used to the consequences of having the protection they offer, protection that isn't available by default in servers and workstations.