By making your players compete during a basketball drill, you are going to challenge them and get more out of each player. Especially if there is a consequence for losing the drill. The idea behind the tennis ball toss competition drill is to force each player to get outside their comfort zone, and to get them to go their absolute fastest and hardest during the drill.
If you know that you have to do some running if you lose the drill, then each player is going to give their all. This is just one tool to promoting a competitive atmosphere in your practices or workouts. Along with competition, you are working on your hand eye coordination and ball handling, becoming a better and more skilled player.