Imagine the scenario of "accidentally" dribbling the ball into an opponent's foot, and the ball gets kicked out of bounds. Or, in an even more extreme case, "passing" (or throwing) the ball out of bounds while barely grazing an opponent. In the most extreme case, I toss the ball into an opponent's head, and it flies out of bounds.
These could result in an out-of-bounds by the opposing team, allowing one to reset the shot clock, for example. Is there any rule in basketball (or the NBA) that prevents these kinds of schemes? Or are there any other factors that stop these kinds of schemes (e.g. they're not consistent, or audiences/sponsors might get angry)?