There are exceptions: when salary is the ONLY problem, and usually that topic will have come up. So if the employee came to talk salary, was denied, then got some offers, came back with them, and asked again, then sure. But any company worth its salt will have done something before the other offers were ever in play.
If someone gets offers right off the bat and never talk salary first, then they'll be gone in 6 months unless you give them way above market rate.
Career advancement some times requires that the current manager say :
"Sofia, this is a great opportunity for you. While we could make you a counteroffer - you really should make the move to advance your career. Please let me know if you want a counteroffer anyhow."Raising the pay of one employee out of band will usually lead to group behavior, meaning others do the same for the same reasons. I was also mostly budget constrained in the past and could not raise budget to significantly (say 20%) pay raise several employees.
If the employee for whatever reasons earns say 10% below average of the other employees, I would get her a pay raise.
I figure the only way to really fix this 'the only way to get a raise is to leave for a year' method is to figure out how to include retention in engineering manager's perf evaluation.