The AI has no awareness to players. If you overtake on the inside, they just turn into you. The AI don't suffer from the collision they just drive through you and carry on, as if they are on rails.
The AI need to have some awareness coded in. So if there is a car in their path, they act as a real driver would, and not just plough through you.