Every sensible employee should regard every paycheck as a renewed offer of employment. If a better deal exists, its their choice, not yours, whether they stay or not.
Your only real option is to treat employees well, make sure they know you appreciate their talents, and try to generate some loyalty.
I don't care about the company I work for and I feel no more loyalty to them then I do an online electronics store. Having said that, my employment has two goals: making me money now and making me money later. This means that I won't leave the company I'm at if someone else offers me $2 more a year. There are a lot of factors that make up my market value and all of them have to be considered. I have left one company to work at another at lower pay because I knew that move would put me in a better position several years down the road, i.e. would increase my market value. I said before I didn't care about companies I work for. Emotionally that's true. Professionally, of course I want them to do well because them failing hurts the value of the time I spent there. I also want to stay long enough to accomplish big things that I can talk about to the next place I interview for.
If you go into a relationship where you are more emotionally attached to them then they are to you you're going to get hurt. And a company is just one downsizing away from letting you go no matter how much they make you feel like "family".
This is how I feel... and probably how most entrepreneurs feel. That's why we are striking out on our own.
This is not how many employees feel. One guy working for me (at wages I pay) felt actively guilty and apologized to me for interviewing with google. I mean, he'd have gotten a staggering raise if he got the job. (I think he's right on the edge of being good enough; I bet if he practised interviewing and tried a few times, he could make it. Fortunately for me, he failed the first interview, and like a lot of people, he finds interviewing uncomfortable.) I mean, if anything, I feel a little bit proud when my employees go on to much bigger and better things; I don't have money, so I hire people that are just starting, or that have been unemployed for a while and need to start over. I mean, I'd /like/ them to stay with me longer? But if you aren't capable of becoming google materiel, well, I try not to let you past the 'project-based contractor' stage, so it's just plain irrational for me to expect people to stick around for my low wages forever.
I absolutely don't understand this. I mean, I don't expect loyalty. (I mean, I expect honesty... but I don't expect anyone to stick around if someone else offers a lot more cash.) But, many employees really do feel something like Loyalty. As a owner, it would be in my interest to put some effort into making those sorts more comfortable.
Now, what to do? I don't really understand that feeling of loyalty, so I can't address it directly, but I can say "besides money, what makes these people comfortable/happy? that I can give them and google can't?" - like one benefit I give employees is extreme schedule flexibility. Another is being careful to have an environment where your employees don't feel like they will get fired. (yeah. I don't get this one, either. But it's huge. Normal people are terrified of getting let go. But, I guess large companies do this, too. Of course, instead of giving people severance, when I have to lay people off, I go pester all the recruiters I know and try to get them better jobs.)
but yeah. this is something, I think, that we, as entrepreneurs, should study. It's important to understand.