Why is it legal to throw the ball off of another player when you are about to fall out of bounds in basketball?

Because the play is called a pass or a save and is always legal. The rule that applies most is the one that states that possession goes to the other team when a player touches the ball last prior to landing out of bounds. Moreover, it takes skill to place the ball on the opposing player with sufficient velocity and in such a way as to insure he will not be able to gather it up and cost YOU a change of possession.