From the point of view of an employee, I disagree. If you are contemplating looking for a new job, then you are unhappy. If you are unhappy with your job, you should at least try talking to your manager. Either:
A: They want to keep you and are reasonable and capable of making the adjustments you desire
B: They don't want to keep you
C: They aren't reasonable
D: They are not capable of making the adjustments you desire
In the event of B they don't want you to be working there any more, so look for a better job. In the event of C or D, you probably don't want to be working there anymore, so look for a better job.
That makes it really easy to reject a potential counter-offer; if they won't give you what you need without you threatening to leave, you probably don't want to work there.
The company has already lost when the employee is contemplating whether they should go look for a new job. Any outcome of this, whether the employee moves around in the company, leaves the company, takes a counter offer is all in the too little too late camp.
That's why a good manager and a good company needs to actively invest effort in making sure their employees are happy and productive. How does the saying go, people don't leave companies, they leave their bosses...
EDIT: It also depends on the company. In a large company like Microsoft you can make moves that are almost like moving to a different company and have advantages (seniority) over changing companies. My experience is those companies have a better chance of retaining employees because of that advantage as long as they make those moves reasonably easy.