Some articles say your relationship with your employer is like your relationship with your partner - any indication of looking elsewhere is disloyalty, and will inevitably lead to a break-up down the line if not now. Or it'll put you first in line for lay-offs. Other articles say your employer has a moral duty to pay a 'fair' amount, and if you can get 20% more elsewhere, that shows you should resent your current employer, and leave on principle. Or that threatening to quit and not following through makes you "the boy who cried wolf" and shows a lack of integrity. Or that the fact you were interviewing in the first place shows you weren't satisfied and fulfilled at your current job.
A lot of the articles are written by recruiters. They don't want people to take the counter-offer because it means they miss out on their 20% commission.
Personally I once accepted a counter-offer and it went just fine - in fact, the job offer would have needed an hour-long commute, whereas my job at the time had a 20 minute commute, so I got the extra money without the extra commute. It didn't limit my career or get me laid off or anything.
The book/article goes in more depth. I thought it was still online for free but I can't seem to find it.
As an individual, if you fully intend to leave, and find your current employer trying to keep you that's a personal decision for sure. For me, I figure if I already put in all the effort to find a better job, I might as well take it. Maybe irrational, but at that point I've already weighed the decision on whether to go. My decisions to leave have usually not been purely about comp but other issues I have with the job.
(I was at place that had an existential problem, and unhappily fighting it. Then, coincidentally, a different company, which had previously made me a tempting offer, checked back in. They made an offer to double my TC, which included a big title jump, to fit their pay grades. I wanted to be loyal to my team, so I went to the appropriate exec at my employer. I said I had an unsolicited offer that I had to decide on immediately, but I would stay if we could solve the problem. Was assured exec understood, and we could tackle the problem. I also asked for the company to do right by a couple other employees, while I had the exec's ear and the moment. Existential problem got worse, and couldn't be solved, for political reasons. Everyone was miserable, and I was out the boost to lifestyle and resume decorations.)
The more usual reasons I know not to mess with counter-offers are that: if the employer wasn't treating you fairly before, that's a problem; you might be flagged as disloyal; they might pay to keep you for temporary convenience, but get rid of you when more convenient for them.
Do you have a example article? I haven't encountered the advice, but I'm curious if the reasoning matches my guess.