It's that time again. The time when the players are moving around, being traded, anticipating, opting out, or trying on new uniforms. It's the off season. This is the time when the NBA GMs/Presidents try to win players' hearts and their abilities. This is all up to the player. The player's decisions are all dependent on a few factors.
First of all, the relationships. Does the player have a good relationship to the white collar guys, the coaches, the players, the fans. If they enjoy being a part of that team, there is a tremendous chance that they will stay. However, if the relationships with the player and the other members of the franchise are rotten, then that particular player will have a difficult time wanting to stay with that team.
Secondly, the chance of winning. There are many players who don't have even a remote chance at winning a title or even making it to the Playoffs. If they feel like they're doing all they can to contribute to winning, and that team is still losing games, that guy is going to want nothing to do with that franchise. Of course the perfect example of this is with LeBron James making the "THE DECISION" to take his talents to South Beach. However, this is all dependent on if the player is competitive enough to do that or is just wanting to have fun and make money. Which brings me to my next factor.
Third, money. It's all about money. If a team doesn't have a lot of cap space for players, and the player in question is feeling greedy, then that player has a great possibility of moving on to another team. The more money to the player, the more the player will stay. It's kind of like giving food to a stray dog.
My final factor: location. NBA players want a nice location. They want beaches, sunshine, clubs, night life, activities. If a city has a good team, money, and good people, but not one of the things above, then they still might attract players. However, even if they don't have a great team or a whole lot of money, but have beaches, night life, good weather, etc. then they still have a chance of getting the player. You can see this with the Lakers (though not now), the Clippers, Miami, Golden State Warriors. Teams such as the Utah Jazz, Portland Trailblazers, Minnesota Timberwolves, Philadelphia 76ers, have been plagued by not the best location or weather or whatever. It's obviously not the biggest factor but it is a factor.
Now, this isn't a guaranteed method, because it's all just one big rolling of the dice.