Briefly, to keep staff happy and productive. It's pretty simple, but an amazing number of HR people fail to grasp the basic principles.
They're frequently good, though, at negotiating salary packages with clauses which discourage firing them in the event of lots of staff leaving in disgust.