A sign and trade agreement is a trade made in the NBA in which a potential free-agent is signed by their team and then immediately traded to another team. This structure exists because a free agent's team would be left without any compensation if their free agent signs with another team.
A player may want a sign-and-trade because it allows the player to get a bigger salary for more years than if they just signed with another team. Again, this is the result of the NBA's CBA, which allows teams to re-sign their own free agents for longer and for more money than other teams. This rule is designed to allow teams to have an advantage when trying to re-sign their own free agents. The teams seeking to sign such a player will benefit by getting the player of their choice, while the player's original team gains something in return for their free agent. A team agreeing to a sign-and-trade may not renege on the agreement and keep the signed player; they must trade him.