I watched the following YouTube video titled "NBA Top 15 Smartest Plays Ever", but I don't understand what happened in the last one.
Magic Johnson appears to get the rebound then throws the ball out of bounds? How is that "smart"?
The time remaining in the game was on the order of 3 seconds. By holding the ball in that position or trying to dribble, he risked a foul or a basket against.
By quickly clearing to the far end, the time ran out before the opponent could take possession in a dangerous area, therefore winning the game for his own team.