Actually, there are surveys in which a company can participate to make its compensation competitive within the same industry. The compensation system should also be based on how well the company can afford it, such as for the annual merit increase or review of annual performance evaluation. Some companies do not focus much on compensation but rather on the benefits provided to employees.
Behavior of an Underpaid Employee
An underpaid employee is likely to be displeased. However, there are also employees who would be content with what they are receiving as long as it suffices for their needs.