Players whose contracts expire in the NBA are allowed to test the free agency waters and select a contract offered to them by both their current team and other teams too. They choose which contract best suits them based on a multitude of factors surrounding the destination team and city that they will be going to.
Some of the main reasons and thinking points that cross a free agent's mind when they choose a team to play for include team success, team legacy, the roster of the team, starting lineup of the team, the role in which they would play, the weather of the city, the conference the team is in, etc. Every player has a different set of wants and needs from a team and situation so these only encompass some of the things that are thought about when making the choice.
A lot of teams were considered great free agent destinations this past offseason and in the near future. Teams like the New York Knicks, the Los Angeles Lakers, and the Boston Celtics have long legacies of being great franchises in the NBA and are always seen as destinations. Other newcomers include the Brooklyn Nets, Los Angeles Clippers, and Atlanta Hawks who have a lot of young players to build around which free agents like to have around them. Southern teams and west coast teams always are seen as better options than teams like the Minnesota Wolves or Toronto Raptors in the North. These teams are good destinations although at the end of the day it all depends on the individual player.