In races, you sometimes find it hard to pass your opposition as your pace is remarkably similar in the same parts of the racetrack. So rather than going for an overtake that puts both of you at risk, you look to force them into a mistake so that you can slip by them.
We see this occur a lot in other forms of motorsport where overtaking is hard to come by due to the closeness of speed between professional drivers, so the trailing driver is trying to put pressure on the car in front and force them into a mistake.