One of the most frequent set pieces of a basketball game is the free throw. Awarded for certain fouls, and then for all fouls after a set number have been committed, the free throw is a penalty which provides the offended team with a chance to score some points, but may also be used by their opponents as a way of limiting the damage and stopping the clock. It is not uncommon to see tactical fouls committed by teams who have learned to see everything in terms of how it impacts the end result.
The truth is that some players are ace shots at free-throw time and giving them the ball with time to get their bearings and no-one getting in their face is tantamount to giving their team free points. On the other hand, some players are so bad at free throws that the opposition will be happy to foul them so that they are the ones charged with trying to score a point. If you are playing against a team with an ace three-point shooter, it makes sense to foul the guy on the team who has nerves of balsa wood on the free-throw line.
In some cases, fouling the free-throw expert is even a reasonable move. When time is running down and you need the ball back, committing a foul is one way of stopping the clock. Even if you know it might mean conceding points, you will want to get hold of the ball and try to score yourself, so it makes more sense not to give them twenty-four seconds to set up their shot.