For some unknown reason the AIs brake and stop near the finish line if there are any cars in the pits. It seems they "think" they could collide with the cars in the pits so they brake and stop to avoid the collision. I did some tests and can confirm this do not happens if there are no cars in the pits.