A company will offer a counter offer so as not to risk being short staffed. What must be understood is that money, title, and a promotion should not be offered when an employee threatens to leave.
Once your loyalty is questioned, it is almost impossible to regain that trust. When tough times approach, there will be a tendency for the employer to begin the cut back with those people least loyal, which could be you. Also, by accepting a counter offer it shows that you are willing to break your commitment to your new employer after accepting their offer, and this could be bad for any future job search. Most companies have strict wage and salary guidelines, if they give you an increase now, it may count as your next review.
The same circumstances that have caused you to consider a change will probably repeat themselves in the future, if you accept the counter offer.
Think what goes through a Manager’s mind when someone quits: "This couldn't be happening at a worse time, and this resignation will make me look bad." "Maybe I can keep this person on until I find a suitable replacement because it will delay me getting the project completed."
Your reasons for wanting to leave will still exist. Conditions are just more tolerable in the short term because of a raise; promotion or promises made to keep you.