I've told a story that highlights this before, but has noone wondered why, when their company makes them an attractive counter-offer, they weren't paying them that rate, or even a FRACTION of it, beforehand? According to Toni, and a few other people's comments, companies and management can be petty and vindictive. You don't want to work in that environment, but sometimes you have no choice. Besides, it's pretty widespread. In any case, it's just business. Your manager can be your friend, but they're paid to keep costs down. To that end, they'll pay you as low as you can get away with until you fight back. A lot of times just asking for a raise gets sorry speaches about overheads, recessions, lack of funding, etc... Until you actually have a foot out of the door. You just have to be prepared to back up that bluff.
When you have to, I remember the phrase, "Money can't buy happiness. But it can buy you a big boat, which CAN make you happy..."

Showing loyalty is definitely a plus, but cash is king.