During a freethrow, distracting the shooter is clearly disallowed according to the rules. But during the game, what is preventing players from trying to distract each other? For example, by screaming just as someone tries to make a shot, or pretend like they're having a spasm. To take it to the extreme, players could scream expletives, or insulting each others family in undertones, to distract and throw each other off (or invite a foul).
What rules are preventing this sort of behavior in the NBA? Or are the only incentives indirect ones, like losing deals and sponsors if you act that way?