You start with the obvious -- managers assess the value of each employee. Roughly, for each employee you derive a dollar amount that is: 1. Larger than what the employee could be paid elsewhere (otherwise, the employee leaves) 2. Close to the employee's contribution to the company's bottom line.
That's a rough science though. #2 is certainly harder than #1.
So, next, you put all that data into a big database. Then you run a variety of sanity checks (aka formulas): 1. Large changes in comp, year over year 2. Discrepancies when broken out by factors including age and gender.
Finally, you're faced with a choice. If you override all of your initial estimates with the formulas, then you have formulaic comp. Otherwise, you're at risk to lawsuits.
Imagine a GOOG executive defending "yes, we paid women less because we honestly think, on average, the male employees contributed more to our bottom line." That's not gunna happen, which sorta leads to formulaic comp, no?